[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Two line init.d scripts? Sure, that will work!

Quoting Petter Reinholdtsen (2014-02-05 22:31:09)
> The idea is to let init.d scripts look like this:
>   #!/lib/init/init-d-script
>   # Provides:          daemon
>   # Required-Start:    $remote_fs $syslog
>   # Required-Stop:     $remote_fs $syslog
>   # Default-Start:     2 3 4 5
>   # Default-Stop:      0 1 6
>   # Short-Description: nice daemon
>   # Description:       Provide service to others
>   DAEMON=/usr/sbin/daemond
> Short and to the point, and in the simple case only list the path to 
> the daemon to start.  The code to implement init.d scripts is moved to 
> /lib/init/init-d-script, and the redundant code spread across 
> /etc/init.d/ can be dropped.

Marvellous idea!

> A few days ago I picked up the idea again, and wrote a more complete
> draft of the /lib/init/init-d-script.  The code is available in the
> simpler-init-scripts in the sysvinit GIT repository, available from
> <URL: http://anonscm.debian.org/gitweb/?p=collab-maint/sysvinit;a=shortlog;h=refs/heads/simpler-init-scripts >.
> I've tested it on a few packages, and believe the code is ready for
> wider testing.
> The main target group for this feature are the majority of packages 
> with init.d scripts, the ones starting a single daemon.  There are 
> around 1000 packages in Debian with init.d scripts.  Around 100 of 
> them start stuff using rcS.d/, and tend to be quite complex.  Most of 
> the rest start a simple daemon and are based on different generations 
> of /etc/init.d/skeleton.  The target for this feature is the latter 
> group.

I am involved in a few of those simple uses, and have long wanted to 
simplify netatalk as well (by splitting the daemons as separate sysV 

As soon as available in Debian (but not before, I cannot find time to 
juggle unusual environments) I will migrate to this simple form.

...unless peers in the various teams I am involved in object, obviously.

 - Jonas

 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

Attachment: signature.asc
Description: signature

Reply to: