El Diumenge, 3 de novembre de 2013, a les 09:02:36, Petter Reinholdtsen va escriure: > Hi.
Hello Petter and everybody, > > Should we create and include something like /lib/init/init-d-script as > described in As an alternative I introduce another script like that, is included in live-net-initramfs, http://livenet.selfip.com/ftp/debian/live-net-initramfs/live-net-initramfs_3.10.2.tar.bz2 The service script is driven by configuration variables, this is an example script in /etc/init.d : /etc/init.d/lnet-firewall ********* #!/bin/sh ### BEGIN INIT INFO # Provides: lnet-firewall # Required-Start: networking # Required-Stop: # X-Start-Before: services # Default-Start: S # Default-Stop: # Short-Description: General purpose firewall # Description: A firewall with configuration. ### END INIT INFO # initializes related variables and declares some functions, . /lib/init/service-init # optionally include a default setting . /etc/default/lnet-firewall # optionally set additional variables DAEMON_ACTIONS_EXTRA="user-status port-accept port-deny" # execute the service init actions . /lib/init/service : ********* Attached are the scripts service-init and service, and a listing of all service configuration variables used, Kind regards, Jordi Pujol Live never ending Tale, GNU/Linux Live forever
# Name: lnet-service-defaults # sample default variable values for a daemon service # # all variables are optional # and almost all come unset from the calling program # daemon program location, default from service name DAEMON="/sbin/daemon" # description, default is parsed from LSB headers DAEMON_DESC="Service program" DAEMON_USAGE="start|stop|restart|status|reload" # if set then # start, stop, or status are not specified in the command line DAEMON_ACTIONS_CMD="y" DAEMON_ACTIONS_EXTRA="user-status port-accept port-deny" # start option is available, # default is parsed from LSB headers # non blank to enable DAEMON_START="y" # stop option is available, default is parsed from LSB headers # non blank to enable DAEMON_STOP="y" # options to append to the command line DAEMON_START_OPTS="-f /etc/daemon.conf" # options for reload the daemon server DAEMON_RELOAD_OPTS="-rx reload" # signal for reload the daemon server DAEMON_RELOAD_SIG="HUP" # options to append to the command line for stop DAEMON_STOP_OPTS="-s" # signal to stop the daemon, default TERM if blank DAEMON_STOP_SIG="TERM" # options to append to the command line for query their status DAEMON_STATUS_OPTS="-s" # set if the daemon program should be forked, else leave unset. DAEMON_BACKGROUND="yes" # we should specify the name of the log file # if the daemon program does not create one by himself # that file will receive all the stdout and stderr output # for the running process. DAEMON_LOG="/var/log/daemon.log" # the name of the pid file created by the daemon program # the default value is /var/run/daemon-name.pid DAEMON_PIDFILE="/var/run/daemon.pid" # non blank if the service program should create the pid file DAEMON_PIDFILE_CREATE="y" # set it if the daemon is not enabled # it can be used to disable services that should start by xinetd DAEMON_DISABLED="y"
lib_init_service
Description: application/shellscript
lib_init_service-init
Description: application/shellscript
_______________________________________________ Pkg-sysvinit-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-sysvinit-devel

