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

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



On 02/06/2014 05:31 AM, Petter Reinholdtsen wrote:
> Hi.
> 
> A few months ago I drafted an idea to rewrite init.d scripts to use a
> common implementation and only specify the unique parts in the init.d
> scripts themselves.  That draft can be found on
> <URL: http://people.skolelinux.org/pere/blog/Debian_init_d_boot_script_example_for_rsyslog.html >.
> 
> The idea is to let init.d scripts look like this:
> 
>   #!/lib/init/init-d-script
>   ### BEGIN INIT INFO
>   # 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
>   ### END INIT INFO
>   DAEMON=/usr/sbin/daemond

By the way, I forgot to mention: the shebang thing replacement was
painful in OpenRC, so we recently made it so that we don't need to
replace it by /bin/openrc-run (previously called "runscripts")... :)

Thomas


Reply to: