Author: ken Date: 2011-11-25 14:03:29 -0700 (Fri, 25 Nov 2011) New Revision: 9017
Modified: trunk/bootscripts/blfs/init.d/dhcp trunk/bootscripts/blfs/init.d/netfs trunk/bootscripts/blfs/init.d/nfs-client trunk/bootscripts/blfs/init.d/nfs-server trunk/bootscripts/blfs/init.d/random Log: Cosmetic changes - use the lsb functions Modified: trunk/bootscripts/blfs/init.d/dhcp =================================================================== --- trunk/bootscripts/blfs/init.d/dhcp 2011-11-25 18:16:12 UTC (rev 9016) +++ trunk/bootscripts/blfs/init.d/dhcp 2011-11-25 21:03:29 UTC (rev 9017) @@ -1,24 +1,45 @@ #!/bin/sh +######################################################################## +# Begin dhcp +# +# Description : Start dhcp daemon +# +# Author : +# +# Version : LFS 7.0 +# +######################################################################## + +### BEGIN INIT INFO +# Provides: dhcp +# Required-Start: network +# Should-Start: +# Required-Stop: sendsignals +# Should-Stop: +# Default-Start: 3 4 5 +# Default-Stop: 0 1 2 6 +# Short-Description: Starts the dhcp server +# Description: Starts the dhcp server to provide IP addresses. +# X-LFS-Provided-By: LFS +### END INIT INFO + +. /lib/lsb/init-functions # Begin $rc_base/init.d/dhcp -# Based on sysklogd script from LFS-3.1 and earlier. -# Rewritten by Gerard Beekmans - [email protected] - #$LastChangedBy$ #$Date$ -. /etc/sysconfig/rc -. $rc_functions - case "$1" in start) - boot_mesg "Starting DHCP Server..." - loadproc /usr/sbin/dhcpd -q eth1 + log_info_msg "Starting DHCP Server..." + start_daemon /usr/sbin/dhcpd -q eth1 + evaluate_retval ;; stop) - boot_mesg "Stopping DHCP Server..." + log_info_msg "Stopping DHCP Server..." killproc /usr/sbin/dhcpd + evaluate_retval ;; restart) Modified: trunk/bootscripts/blfs/init.d/netfs =================================================================== --- trunk/bootscripts/blfs/init.d/netfs 2011-11-25 18:16:12 UTC (rev 9016) +++ trunk/bootscripts/blfs/init.d/netfs 2011-11-25 21:03:29 UTC (rev 9017) @@ -1,29 +1,49 @@ #!/bin/sh +######################################################################## +# Begin netfs +# +# Description : Mount network filesystems +# +# Author : Nathan Coulson - [email protected] +# DJ Lucas - [email protected] +# +# Version : LFS 7.0 +# +######################################################################## + +### BEGIN INIT INFO +# Provides: nfs mounts +# Required-Start: network +# Should-Start: +# Required-Stop: sendsignals +# Should-Stop: +# Default-Start: 3 4 5 +# Default-Stop: 0 1 2 6 +# Short-Description: Mounts network volumes. +# Description: Mounts anything marked as _netdev, and umounts +# any mounted _netfs,smbfs,ncpfd,coda, nfs +# volumes +# X-LFS-Provided-By: LFS +### END INIT INFO + +. /lib/lsb/init-functions # Begin $rc_base/init.d/netfs -# Based on sysklogd script from LFS-3.1 and earlier. -# Rewritten by Gerard Beekmans - [email protected] -# netfs script written by Nathan Coulson - [email protected] -# and by DJ Lucas - [email protected] - #$LastChangedBy$ #$Date$ -. /etc/sysconfig/rc -. $rc_functions - case "$1" in start) # The following line mounts all entries in fstab that # have the _netdev option. This is required for network # filesystems to be mounted at boot time. - boot_mesg "Mounting network volumes..." + log_info_msg "Mounting network volumes..." /bin/mount -a -O _netdev evaluate_retval ;; stop) - boot_mesg -n "Unmounting network volumes..." + log_info_msg "Unmounting network volumes..." # The following line obtains a list from the output of # mount for all netfs types and anything that was @@ -81,7 +101,7 @@ fi else # There is nothing mounted - boot_mesg "No network volumes mounted!" + log_info_msg "No network volumes mounted!" # print a nice '[ OK ]' message echo_ok fi Modified: trunk/bootscripts/blfs/init.d/nfs-client =================================================================== --- trunk/bootscripts/blfs/init.d/nfs-client 2011-11-25 18:16:12 UTC (rev 9016) +++ trunk/bootscripts/blfs/init.d/nfs-client 2011-11-25 21:03:29 UTC (rev 9017) @@ -1,4 +1,29 @@ #!/bin/sh +######################################################################## +# Begin nfs-client +# +# Description : Start statd +# +# Author : +# +# Version : LFS 7.0 +# +######################################################################## + +### BEGIN INIT INFO +# Provides: File locking for nfs client +# Required-Start: network +# Should-Start: +# Required-Stop: sendsignals +# Should-Stop: +# Default-Start: 3 4 5 +# Default-Stop: 0 1 2 6 +# Short-Description: Starts statd +# Description: Rpc.statd provides file locking on nfs. +# X-LFS-Provided-By: LFS +### END INIT INFO + +. /lib/lsb/init-functions # Begin $rc_base/init.d/nfs-client # Based on sysklogd script from LFS-3.1 and earlier. @@ -7,17 +32,14 @@ #$LastChangedBy$ #$Date$ -. /etc/sysconfig/rc -. $rc_functions - case "$1" in start) - boot_mesg "Starting NFS statd..." - loadproc /usr/sbin/rpc.statd + log_info_msg "Starting NFS statd..." + start_daemon /usr/sbin/rpc.statd ;; stop) - boot_mesg "Stopping NFS statd..." + log_info_msg "Stopping NFS statd..." killproc /usr/sbin/rpc.statd ;; Modified: trunk/bootscripts/blfs/init.d/nfs-server =================================================================== --- trunk/bootscripts/blfs/init.d/nfs-server 2011-11-25 18:16:12 UTC (rev 9016) +++ trunk/bootscripts/blfs/init.d/nfs-server 2011-11-25 21:03:29 UTC (rev 9017) @@ -1,84 +1,105 @@ + #!/bin/sh #!/bin/sh +######################################################################## +# Begin nfs-server +# +# Description : Start nfs server +# +# Author : +# +# Version : LFS 7.0 +# +######################################################################## + +### BEGIN INIT INFO +# Provides: nfs server +# Required-Start: network +# Should-Start: +# Required-Stop: sendsignals +# Should-Stop: +# Default-Start: 3 4 5 +# Default-Stop: 0 1 2 6 +# Short-Description: Starts the nfs server +# Description: Starts the dhcp server to export directories. +# X-LFS-Provided-By: LFS +### END INIT INFO + +. /lib/lsb/init-functions # Begin $rc_base/init.d/nfs-server -# Based on sysklogd script from LFS-3.1 and earlier. -# Rewritten by Gerard Beekmans - [email protected] + #$LastChangedBy$ + #$Date$ -#$LastChangedBy$ -#$Date$ + . /etc/sysconfig/nfs-server -. /etc/sysconfig/rc -. $rc_functions -. /etc/sysconfig/nfs-server - -case "$1" in + case "$1" in start) - boot_mesg "Starting NFS mountd..." - loadproc /usr/sbin/rpc.mountd + log_info_msg "Starting NFS mountd..." + start_daemon /usr/sbin/rpc.mountd - boot_mesg "Starting NFS nfsd..." - loadproc /usr/sbin/rpc.nfsd -p $PORT $PROCESSES + log_info_msg "Starting NFS nfsd..." + start_daemon /usr/sbin/rpc.nfsd -p $PORT $PROCESSES - boot_mesg "Starting NFS statd..." - loadproc /usr/sbin/rpc.statd + log_info_msg "Starting NFS statd..." + start_daemon /usr/sbin/rpc.statd if [ "$QUOTAS" = "yes" ]; then - boot_mesg "Starting NFS rquotad..." - loadproc /usr/sbin/rpc.rquotad + log_info_msg "Starting NFS rquotad..." + start_daemon /usr/sbin/rpc.rquotad fi # NFSD support only in 2.6 kernel /bin/uname -r | /bin/grep "2.6" 2>&1 > /dev/null if [ $? = 0 ]; then - boot_mesg "Mounting nfsd virtual filesystem..." + log_info_msg "Mounting nfsd virtual filesystem..." /bin/mount -t nfsd none /proc/fs/nfsd 2>&1 > /dev/null evaluate_retval fi - # Make ceratin that the list is refreshed on + # Make certain that the list is refreshed on # a restart. - boot_mesg "Exporting NFS Filesystems..." + log_info_msg "Exporting NFS Filesystems..." /usr/sbin/exportfs -ra 2>&1 > /dev/null evaluate_retval ;; stop) - boot_mesg "Stopping NFS statd..." + log_info_msg "Stopping NFS statd..." killproc /usr/sbin/rpc.statd - boot_mesg "Stopping NFS nfsd..." + log_info_msg "Stopping NFS nfsd..." # nfsd needs HUP.... killproc nfsd HUP - boot_mesg "Stopping NFS mountd..." + log_info_msg "Stopping NFS mountd..." killproc /usr/sbin/rpc.mountd if [ "$QUOTAS" = "yes" ]; then - boot_mesg "Stopping NFS rquotad..." + log_info_msg "Stopping NFS rquotad..." killproc /usr/sbin/rpc.rquotad fi - boot_mesg "Refreshing NFS Exported Filesystems..." + log_info_msg "Refreshing NFS Exported Filesystems..." /usr/sbin/exportfs -au 2>&1 > /dev/null evaluate_retval # NFSD support only in 2.6 kernel - /bin/uname -r | /bin/grep "2.6" 2>&1 > /dev/null - if [ $? = 0 ]; then - boot_mesg "Unmounting NFS Virtual Filesystem..." + /bin/uname -r | /bin/grep "2.6" 2>&1 > /dev/null + if [ $? = 0 ]; then + log_info_msg "Unmounting NFS Virtual Filesystem..." /bin/umount /proc/fs/nfsd 2>&1 > /dev/null evaluate_retval fi # Remove a pid file that isn't done automatically - boot_mesg "Removing the rpc.statd pid file if it exists" + log_info_msg "Removing the rpc.statd pid file if it exists" if [ -f /var/run/rpc.statd.pid ]; then rm -f /var/run/rpc.statd.pid fi ;; reload) - boot_mesg "Reloading NFS Server..." + log_info_msg "Reloading NFS Server..." /usr/sbin/exportfs -ra evaluate_retval ;; Modified: trunk/bootscripts/blfs/init.d/random =================================================================== --- trunk/bootscripts/blfs/init.d/random 2011-11-25 18:16:12 UTC (rev 9016) +++ trunk/bootscripts/blfs/init.d/random 2011-11-25 21:03:29 UTC (rev 9017) @@ -1,19 +1,42 @@ #!/bin/sh -# Begin $rc_base/init.d/random +######################################################################## +# Begin random +# +# Description : Seed /dev/urandom +# +# Author : Larry Lawrence +# +# Version : LFS 7.0 +# +######################################################################## +### BEGIN INIT INFO +# Provides: Initialises /dev/urandom +# Required-Start: network +# Should-Start: +# Required-Stop: sendsignals +# Should-Stop: +# Default-Start: 3 4 5 +# Default-Stop: 0 1 2 6 +# Short-Description: Initialises /dev/urandom +# Description: Initialises /dev/urandom from a seed stored in +# /var/tmp. +# X-LFS-Provided-By: LFS +### END INIT INFO + # Based on sysklogd script from LFS-3.1 and earlier. # Rewritten by Gerard Beekmans - [email protected] # Random script elements by Larry Lawrence +. /lib/lsb/init-functions +# Begin $rc_base/init.d/random + #$LastChangedBy$ #$Date$ -. /etc/sysconfig/rc -. $rc_functions - case "$1" in start) - boot_mesg "Initializing kernel random number generator..." + log_info_msg "Initializing kernel random number generator..." if [ -f /var/tmp/random-seed ]; then /bin/cat /var/tmp/random-seed >/dev/urandom fi @@ -23,7 +46,7 @@ ;; stop) - boot_mesg "Saving random seed..." + log_info_msg "Saving random seed..." /bin/dd if=/dev/urandom of=/var/tmp/random-seed \ count=1 &>/dev/null evaluate_retval -- http://linuxfromscratch.org/mailman/listinfo/blfs-book FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
