[blfs-book] r9000 - trunk/bootscripts/blfs/init.d

Wayne Blaszczyk wblaszcz at bigpond.net.au
Sat Nov 26 15:06:29 PST 2011


On 27/11/11 09:30, Bruce Dubbs wrote:
> Wayne Blaszczyk wrote:
> 
>>>> Modified: trunk/bootscripts/blfs/init.d/dbus
>>>> ===================================================================
>>>> --- trunk/bootscripts/blfs/init.d/dbus	2011-11-22 00:20:52 UTC (rev 8999)
>>>> +++ trunk/bootscripts/blfs/init.d/dbus	2011-11-22 07:48:20 UTC (rev 9000)
> 
>>>>                  boot_mesg "Starting the D-Bus Messagebus Daemon..."
>>>> +                mkdir -p /run/dbus
>>>>                  /usr/bin/dbus-uuidgen --ensure
>>>>                  loadproc /usr/bin/dbus-daemon --system
>>>>                  ;;
>>> This needs a bit more to be fully LFS7 compatible.  See, for instance 
>>> sshd or cups boot scripts.
>>>
>>>    -- Bruce
>>>
>> Sorry, I did look at mysql as suggested and didn't find anything else
>> that was significant. I'll have another look but I'm not sure what I'm
>> looking for. The bootscript stopped and started the process as expected.
>> Wayne.
> 
> Your script is using the old functions.
> 
> It should look like:
> 
> #!/bin/sh
> ########################################################################
> # Begin /etc/init.d/mysql
> #
> # Description : Start MysSQL Server
> #
> # Author      : Bruce Dubbs - bdubbs at linuxfromscratch.org
> #
> # Version     : LFS 7.0
> #
> ########################################################################
> 
> ### BEGIN INIT INFO
> # Provides:            $svnserve
> # Required-Start:
> # Should-Start:
> # Required-Stop:       $sendsignals
> # Should-Stop:
> # Default-Start:       3 4 5
> # Default-Stop:        0 1 2 6
> # Short-Description:   Starts MySQL server.
> # Description:         Starts MySQL server.
> # X-LFS-Provided-By:   LFS
> ### END INIT INFO
> 
> . /lib/lsb/init-functions
> 
> 
>    start)
>        log_info_msg "Starting the D-Bus Messagebus Daemon..."
>        mkdir -p /run/dbus
>        /usr/bin/dbus-uuidgen --ensure
>        start_daemon /usr/bin/dbus-daemon --system
>        evaluate_retval
> 
> etc.
> 
>    -- Bruce
I had another look. I'm still confused about the INIT INFO section.
Namely, the
# Provides:
# Required-Start:
# Should-Start:
# Required-Stop:
# Should-Stop:
Are these comments only, or do they actually do something? Some have $
signs (variables?), and others don't. In the above example you have
'Provides: $svnserve', I don't see the connection between svn and mysql.
Is there some documentation on how to write up these 'new' bootscripts.
Wayne.



More information about the blfs-book mailing list