r4690 - trunk/bootscripts/blfs/init.d

dj at linuxfromscratch.org dj at linuxfromscratch.org
Thu Jul 7 22:07:04 PDT 2005


Author: dj
Date: 2005-07-07 23:07:04 -0600 (Thu, 07 Jul 2005)
New Revision: 4690

Modified:
   trunk/bootscripts/blfs/init.d/gpm
   trunk/bootscripts/blfs/init.d/iptables
   trunk/bootscripts/blfs/init.d/kerberos
   trunk/bootscripts/blfs/init.d/lisa
   trunk/bootscripts/blfs/init.d/lprng
   trunk/bootscripts/blfs/init.d/mysql
   trunk/bootscripts/blfs/init.d/nas
   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/ntp
Log:
New functions round two...

Modified: trunk/bootscripts/blfs/init.d/gpm
===================================================================
--- trunk/bootscripts/blfs/init.d/gpm	2005-07-08 05:02:30 UTC (rev 4689)
+++ trunk/bootscripts/blfs/init.d/gpm	2005-07-08 05:07:04 UTC (rev 4690)
@@ -25,12 +25,12 @@
 
 case "$1" in
 	start)
-		echo "Starting gpm..."
+		boot_mesg "Starting gpm..."
 		loadproc /usr/sbin/gpm -m "$MDEVICE" -t "$PROTOCOL" "$GPMOPTS"
 		;;
 
 	stop)
-		echo "Stopping gpm..."
+		boot_mesg "Stopping gpm..."
 		killproc /usr/sbin/gpm
 		;;
 

Modified: trunk/bootscripts/blfs/init.d/iptables
===================================================================
--- trunk/bootscripts/blfs/init.d/iptables	2005-07-08 05:02:30 UTC (rev 4689)
+++ trunk/bootscripts/blfs/init.d/iptables	2005-07-08 05:07:04 UTC (rev 4690)
@@ -10,13 +10,13 @@
 case "$1" in
     start)
         if [ -x /etc/rc.d/rc.iptables ]; then
-          echo "Starting iptables..."
+          boot_mesg "Starting iptables..."
           loadproc /etc/rc.d/rc.iptables
         fi
         ;;
 
     lock)
-        echo "Locking system iptables firewall..."
+        boot_mesg "Locking system iptables firewall..."
         /sbin/iptables --policy INPUT   DROP
         /sbin/iptables --policy OUTPUT  DROP
         /sbin/iptables --policy FORWARD DROP
@@ -28,10 +28,11 @@
         /sbin/iptables -t mangle --delete-chain
         /sbin/iptables -A INPUT  -i lo -j ACCEPT
         /sbin/iptables -A OUTPUT -o lo -j ACCEPT
+	boot_mesg_flush
         ;;
 
     clear)
-        echo "Clearing system iptables iptables..."
+        boot_mesg "Clearing system iptables iptables..."
         /sbin/iptables --policy INPUT   ACCEPT
         /sbin/iptables --policy OUTPUT  ACCEPT
         /sbin/iptables --policy FORWARD ACCEPT
@@ -41,6 +42,7 @@
         /sbin/iptables           --delete-chain
         /sbin/iptables -t nat    --delete-chain
         /sbin/iptables -t mangle --delete-chain
+	boot_mesg_flush
         ;;
 
     status)
@@ -55,4 +57,4 @@
         ;;
 esac
 
-# End $rc_base/init.d/ntp
+# End $rc_base/init.d/iptables

Modified: trunk/bootscripts/blfs/init.d/kerberos
===================================================================
--- trunk/bootscripts/blfs/init.d/kerberos	2005-07-08 05:02:30 UTC (rev 4689)
+++ trunk/bootscripts/blfs/init.d/kerberos	2005-07-08 05:07:04 UTC (rev 4690)
@@ -12,23 +12,23 @@
 
 case "$1" in
         start)  
-                echo "Starting Kerberos Authentication..."
+                boot_mesg "Starting Kerberos Authentication..."
                 loadproc krb5kdc
-                echo "Starting Kerberos Admin Daemon..."
+                boot_mesg "Starting Kerberos Admin Daemon..."
                 loadproc kadmind
                 ;;
 
         stop)
-                echo "Stopping Kerberos Authentication..."
+                boot_mesg "Stopping Kerberos Authentication..."
                 killproc krb5kdc
-                echo "Stopping Kerberos Admin Daemon..."
+                boot_mesg "Stopping Kerberos Admin Daemon..."
                 killproc kadmind
                 ;;
 
         reload)
-                echo "Reloading Kerberos Authentication..."
+                boot_mesg "Reloading Kerberos Authentication..."
                 reloadproc krb5kdc
-                echo "Reloading Kerberos Admin Daemon..."
+                boot_mesg "Reloading Kerberos Admin Daemon..."
                 reloadproc kadmind
                 ;;
 

Modified: trunk/bootscripts/blfs/init.d/lisa
===================================================================
--- trunk/bootscripts/blfs/init.d/lisa	2005-07-08 05:02:30 UTC (rev 4689)
+++ trunk/bootscripts/blfs/init.d/lisa	2005-07-08 05:07:04 UTC (rev 4690)
@@ -14,17 +14,17 @@
 
 case "$1" in
         start)
-                echo "Starting LISA Daemon..."
+                boot_mesg "Starting LISA Daemon..."
                 loadproc /opt/kde/bin/lisa
                 ;;
 
         stop)
-                echo "Stopping LISA Daemon..."
+                boot_mesg "Stopping LISA Daemon..."
                 killproc /opt/kde/bin/lisa
                 ;;
 
         reload)
-                echo "Reloading LISA Daemon..."
+                boot_mesg "Reloading LISA Daemon..."
                 reloadproc /opt/kde/bin/lisa
                 ;;
 

Modified: trunk/bootscripts/blfs/init.d/lprng
===================================================================
--- trunk/bootscripts/blfs/init.d/lprng	2005-07-08 05:02:30 UTC (rev 4689)
+++ trunk/bootscripts/blfs/init.d/lprng	2005-07-08 05:07:04 UTC (rev 4690)
@@ -12,17 +12,17 @@
 
 case "$1" in
 	start)
-		echo "Starting lpd..."
+		boot_mesg "Starting lpd..."
 		loadproc /usr/sbin/lpd
 		;;
 
 	stop)
-		echo "Stopping lpd..."
+		boot_mesg "Stopping lpd..."
 		killproc /usr/sbin/lpd
 		;;
 
 	reload)
-		echo "Reloading lpd..."
+		boot_mesg "Reloading lpd..."
 		reloadproc /usr/sbin/lpd
 		;;
 

Modified: trunk/bootscripts/blfs/init.d/mysql
===================================================================
--- trunk/bootscripts/blfs/init.d/mysql	2005-07-08 05:02:30 UTC (rev 4689)
+++ trunk/bootscripts/blfs/init.d/mysql	2005-07-08 05:07:04 UTC (rev 4690)
@@ -15,13 +15,14 @@
 
 case "$1" in
 	start)
-		echo "Starting MySQL daemon..."
+		boot_mesg -n "Starting MySQL daemon..."
 		failure=0
 		if [ -f "$PIDFILE" ]
 		then
 			if /bin/ps p `cat $PIDFILE` | grep mysqld >/dev/null
 			then
-				print_status warning running
+				boot_mesg "mysqld already running!" ${WARNING}
+				echo_warning
 				exit 0
 			else
 				rm -f "$PIDFILE"
@@ -33,7 +34,8 @@
 		fi
 		if [ "$failure" = "1" ]
 		then
-			print_status failure
+			echo ""
+			echo_failure
 		else
 			/usr/bin/mysqld_safe --user=mysql 2>&1 >/dev/null &
 			evaluate_retval
@@ -41,12 +43,14 @@
 		;;
 
 	stop)
-		echo "Stopping MySQL daemon..."
+		boot_mesg -n "Stopping MySQL daemon..."
 		if [ -e "$PIDFILE" ]
 		then
+			echo ""
 			killproc -p ${PIDFILE} /usr/bin/mysqld_safe
 		else
-			print_status warning not_running
+			boot_mesg "mysqld not running!" ${WARNING}
+			echo_warning
 			if [ -e "$PIDFILE" ]
 			then
 				rm -f $PIDFILE

Modified: trunk/bootscripts/blfs/init.d/nas
===================================================================
--- trunk/bootscripts/blfs/init.d/nas	2005-07-08 05:02:30 UTC (rev 4689)
+++ trunk/bootscripts/blfs/init.d/nas	2005-07-08 05:07:04 UTC (rev 4690)
@@ -12,7 +12,7 @@
 
 case "$1" in
         start)
-                echo "Starting the Network Audio System Server..."
+                boot_mesg "Starting the Network Audio System Server..."
 		loadproc /usr/X11R6/bin/nasd -aa -b
 #                pidof nasd
 #                if test $? = "0"
@@ -30,12 +30,12 @@
 		;;
 
         stop)
-                echo "Stopping the Network Audio System Server..."
+                boot_mesg "Stopping the Network Audio System Server..."
                 killproc /usr/X11R6/bin/nasd
                 ;;
 
         reload)
-                echo "Reloading the Network Audio System Server..."
+                boot_mesg "Reloading the Network Audio System Server..."
                 reloadproc /usr/X11R6/bin/nasd
                 ;;
 

Modified: trunk/bootscripts/blfs/init.d/netfs
===================================================================
--- trunk/bootscripts/blfs/init.d/netfs	2005-07-08 05:02:30 UTC (rev 4689)
+++ trunk/bootscripts/blfs/init.d/netfs	2005-07-08 05:07:04 UTC (rev 4690)
@@ -17,13 +17,13 @@
 		# 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.
-		echo "Mounting network volumes..."
+		boot_mesg "Mounting network volumes..."
 		/bin/mount -a -O _netdev
 		evaluate_retval
 		;;
 
 	stop)
-		echo -n "Unmounting network volumes..."
+		boot_mesg -n "Unmounting network volumes..."
 
 		# The following line obtains a list from the output of
 		# mount for all netfs types and anything that was
@@ -81,9 +81,9 @@
 			fi
 		else
 			# There is nothing mounted
-			echo "No network volumes mounted!"
+			boot_mesg "No network volumes mounted!"
 			# print a nice '[  OK  ]' message
-			evaluate_retval
+			echo_ok
 		fi
 		;;
 

Modified: trunk/bootscripts/blfs/init.d/nfs-client
===================================================================
--- trunk/bootscripts/blfs/init.d/nfs-client	2005-07-08 05:02:30 UTC (rev 4689)
+++ trunk/bootscripts/blfs/init.d/nfs-client	2005-07-08 05:07:04 UTC (rev 4690)
@@ -12,12 +12,12 @@
 
 case "$1" in
 	start)
-		echo "Starting NFS statd..."
+		boot_mesg "Starting NFS statd..."
 		loadproc /usr/sbin/rpc.statd
 		;;
 
 	stop)
-		echo "Stopping NFS statd..."
+		boot_mesg "Stopping NFS statd..."
 		killproc /usr/sbin/rpc.statd
 		;;
 

Modified: trunk/bootscripts/blfs/init.d/nfs-server
===================================================================
--- trunk/bootscripts/blfs/init.d/nfs-server	2005-07-08 05:02:30 UTC (rev 4689)
+++ trunk/bootscripts/blfs/init.d/nfs-server	2005-07-08 05:07:04 UTC (rev 4690)
@@ -13,40 +13,40 @@
 
 case "$1" in
 	start)
-		echo "Starting NFS mountd..."
+		boot_mesg "Starting NFS mountd..."
 		loadproc /usr/sbin/rpc.mountd
 
-		echo "Starting NFS nfsd..."
+		boot_mesg "Starting NFS nfsd..."
 		loadproc /usr/sbin/rpc.nfsd -p $PORT $PROCESSES
 
-		echo "Starting NFS statd..."
+		boot_mesg "Starting NFS statd..."
 		loadproc /usr/sbin/rpc.statd
 
 		if [ "$QUOTAS" == "yes" ]; then
-			echo "Starting NFS rquotad..."
+			boot_mesg "Starting NFS rquotad..."
 			loadproc /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
-			echo "Mounting nfsd virtual filesystem..."
+			boot_mesg "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
 		# a restart.
-		echo "Exporting NFS Filesystems..."
+		boot_mesg "Exporting NFS Filesystems..."
 		/usr/sbin/exportfs -ra 2>&1 > /dev/null
 		evaluate_retval
 		;;
 
 	stop)
-		echo "Stopping NFS statd..."
+		boot_mesg "Stopping NFS statd..."
 		killproc /usr/sbin/rpc.statd
 
-		echo "Stopping NFS nfsd..."
+		boot_mesg "Stopping NFS nfsd..."
 		# nfsd needs HUP....
 		TEMPSTOPSIG="$STOPSIG"
 		STOPSIG="HUP"
@@ -55,29 +55,29 @@
 		# return STOPSIG to it's orginal value...
 		STOPSIG="$TEMPSTOPSIG"
 
-		echo "Stopping NFS mountd..."
+		boot_mesg "Stopping NFS mountd..."
 		killproc /usr/sbin/rpc.mountd
 
 		if [ "$QUOTAS" == "yes" ]; then
-			echo "Stopping NFS rquotad..."
+			boot_mesg "Stopping NFS rquotad..."
 			killproc /usr/sbin/rpc.rquotad
 		fi
 
-		echo "Refreshing NFS Exported Filesystems..."
+		boot_mesg "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
-			echo "Unmounting NFS Virtual Filesystem..."
+			boot_mesg "Unmounting NFS Virtual Filesystem..."
 			/bin/umount /proc/fs/nfsd 2>&1 > /dev/null
 			evaluate_retval
 		fi
 		;;
 
 	reload)
-		echo "Reloading NFS Server..."
+		boot_mesg "Reloading NFS Server..."
 		/usr/sbin/exportfs -ra
 		evaluate_retval
 		;;

Modified: trunk/bootscripts/blfs/init.d/ntp
===================================================================
--- trunk/bootscripts/blfs/init.d/ntp	2005-07-08 05:02:30 UTC (rev 4689)
+++ trunk/bootscripts/blfs/init.d/ntp	2005-07-08 05:07:04 UTC (rev 4690)
@@ -9,13 +9,13 @@
 
 case "$1" in
 	start)
-		echo "Starting ntpd..."
+		boot_mesg "Starting ntpd..."
 		ntpd -gqx
 		loadproc /usr/sbin/ntpd
 		;;
 
 	stop)
-		echo "Stopping ntpd..."
+		boot_mesg "Stopping ntpd..."
 		killproc /usr/sbin/ntpd
 		;;
 




More information about the blfs-book mailing list