#!/bin/bash ### BEGIN INIT INFO # Provides: llxcfg # Required-Start: $local_fs $remote_fs $network # Required-Stop: $local_fs $remote_fs # Should-Start: # Should-Stop: # Default-Start: S # Default-Stop: 0 6 # Short-Description: Generates required LliureX config files # Description: Debian init.d script for llxcfg. Executes the # scripts enabled for the llxcfg. ### END INIT INFO # ------- # File: /etc/init.d/llxcfg # Author: Sergio Talens-Oliag # Copyright: (c) 2005 Sergio Talens-Oliag # Modified: 2007-04-19 Luis Garcia Gisbert # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston MA 02110-1301 USA # -------- set -e SCRIPTS_DIR="/etc/llxcfg/scripts-enabled" test -d "$SCRIPTS_DIR" || exit 0 case "$1" in start) run-parts --arg=start "$SCRIPTS_DIR" ;; stop) run-parts --reverse --arg=stop "$SCRIPTS_DIR" ;; restart|force-reload) $0 stop sleep 1 $0 start ;; services) run-parts --arg=services "$SCRIPTS_DIR" ;; vars) run-parts --arg=vars "$SCRIPTS_DIR" ;; *) echo "Usage: $0 {start|stop|restart|force-reload|services|vars}" >&2 exit 1 ;; esac exit 0