r4694 - trunk/bootscripts/blfs/init.d

dj at linuxfromscratch.org dj at linuxfromscratch.org
Fri Jul 8 17:31:20 PDT 2005


Author: dj
Date: 2005-07-08 18:31:19 -0600 (Fri, 08 Jul 2005)
New Revision: 4694

Modified:
   trunk/bootscripts/blfs/init.d/autofs
   trunk/bootscripts/blfs/init.d/courier
   trunk/bootscripts/blfs/init.d/cyrus-sasl
   trunk/bootscripts/blfs/init.d/exim
   trunk/bootscripts/blfs/init.d/heimdal
Log:
New functions complete?

Modified: trunk/bootscripts/blfs/init.d/autofs
===================================================================
--- trunk/bootscripts/blfs/init.d/autofs	2005-07-08 06:21:36 UTC (rev 4693)
+++ trunk/bootscripts/blfs/init.d/autofs	2005-07-09 00:31:19 UTC (rev 4694)
@@ -107,34 +107,34 @@
         (
             while read dir type map options
             do 
-                echo -n "Automounting $dir..."
+                boot_mesg -n "Automounting $dir..."
                 pidfile=$(echo $dir | sed -e "y/\//-/" | sed -e "s/^-//")
                 pidpath=${piddir}/${pidroot}.${pidfile}.pid
 
                 if [ ! -d "$dir" ]
                 then
-                    echo -n " Creating mountpoint $dir..."
+                    boot_mesg -n " Creating mountpoint $dir..."
                     mkdir -p "$dir"
                 fi
 
                 if [ ! -e "$map" ]
                 then
-                    echo "Map file $map does not exist!"
-                    print_status failure
+                    boot_mesg "Map file $map does not exist!" ${FAILURE}
+                    echo_failed
                     continue
                 fi
 
                 if [ ! -x "$map" -a "$type" == "program" ]
                 then
-                    echo "Map file $map is not executable!"
-                    print_status failure
+                    boot_mesg "Map file $map is not executable!" ${FAILURE}
+                    echo_failed
                     continue
                 fi
 
                 if [ -e "$pidpath" ]
                 then
-                    echo " "
-                    print_status warning running
+                    boot_mesg " already running!" ${WARNING}
+                    echo_warning
                 else
                     echo " "
                     $automount -p $pidpath $daemonoptions $dir $type $map $options $localoptions
@@ -153,7 +153,7 @@
                 pid=$(cat $pidpath)
                 pidfile=$(basename $pidpath)
                 mountpoint=$(echo $pidfile | sed -e "s/^autofs\.\(.*\)\.pid$/\1/" | sed -e "y/-/\//")
-                echo "Stopping automount on /$mountpoint..."
+                boot_mesg "Stopping automount on /$mountpoint..."
                 kill $pid
                 evaluate_retval
             done
@@ -165,7 +165,7 @@
         (
             while read pid everything_else
             do
-                echo "Stopping automount with pid $pid..."
+                boot_mesg "Stopping automount with pid $pid..."
                 kill $pid
                 evaluate_retval
             done

Modified: trunk/bootscripts/blfs/init.d/courier
===================================================================
--- trunk/bootscripts/blfs/init.d/courier	2005-07-08 06:21:36 UTC (rev 4693)
+++ trunk/bootscripts/blfs/init.d/courier	2005-07-09 00:31:19 UTC (rev 4694)
@@ -14,15 +14,16 @@
 	start)
 		# Start daemons.
 		touch /var/lock/subsys/courier
-		echo "Starting Courier mail services:"
+		boot_mesg "Starting Courier mail services:"
+		boot_mesg_flush
 
 		# Start courierfilter
-		echo "     Courierfilter..."
+		boot_mesg "     Courierfilter..."
 		/usr/sbin/courierfilter start
 		evaluate_retval		
 
 		# Start authdaemond
-		echo "     Auth..."
+		boot_mesg "     Auth..."
 		/usr/lib/courier/authlib/authdaemond start
 		evaluate_retval
 
@@ -30,7 +31,7 @@
 		if [ -f /etc/courier/ldapaliasd ]; then
 			. /etc/courier/ldapaliasd
 			if [ "${LDAPALIASDSTART}" == "YES" ]; then
-				echo "     LDAP Alias..."
+				boot_mesg "     LDAP Alias..."
 				/usr/sbin/courierldapaliasd start
 				if [ "${?}" -eq "0" ]; then
 					echo_ok
@@ -45,14 +46,14 @@
 		if [ -f /etc/courier/webmaild ]; then
 			. /etc/courier/webmaild
 			if [ "${WEBMAILDSTART}" == "YES" ]; then
-				echo "     Webmail..."
+				boot_mesg "     Webmail..."
 				/usr/sbin/webmaild start
 				evaluate_retval
 			fi
 		fi
 
 		# Start Courierd
-		echo "     Courier..."
+		boot_mesg "     Courier..."
 		/usr/sbin/courier start
 		evaluate_retval
 
@@ -60,7 +61,7 @@
 		if [ -f /etc/courier/esmtpd ]; then
 			. /etc/courier/esmtpd
 			if [ "${ESMTPDSTART}" == "YES" ]; then
-				echo "     ESMTP..."
+				boot_mesg "     ESMTP..."
 				/usr/sbin/esmtpd start
 				evaluate_retval
 			fi
@@ -70,7 +71,7 @@
 		if [ -f /etc/courier/esmtpd-msa ]; then
 			. /etc/courier/esmtpd-msa
 			if [ "${ESMTPDSTART}" == "YES" ]; then
-				echo "     ESMTP-MSA..."
+				boot_mesg "     ESMTP-MSA..."
 				/usr/sbin/esmtpd-msa start
 				evaluate_retval
 			fi
@@ -79,7 +80,7 @@
 		if [ -f /etc/courier/esmtpd-ssl ]; then
 			. /etc/courier/esmtpd-ssl
 			if [ "${ESMTPDSSLSTART}" == "YES" ]; then
-				echo "     ESMTP-SSL..."
+				boot_mesg "     ESMTP-SSL..."
 				/usr/sbin/esmtpd-ssl start
 				evaluate_retval
 			fi
@@ -89,7 +90,7 @@
 		if [ -f /etc/courier/pop3d ]; then
 			. /etc/courier/pop3d
 			if [ "${POP3DSTART}" == "YES" ]; then
-				echo "     POP3..."
+				boot_mesg "     POP3..."
 				/usr/sbin/pop3d start
 				evaluate_retval
 			fi
@@ -99,7 +100,7 @@
 		if [ -f /etc/courier/pop3d-ssl ]; then
 			. /etc/courier/pop3d-ssl
 			if [ "${POP3DSSLSTART}" == "YES" ]; then
-				echo "     POP3-SSL..."
+				boot_mesg "     POP3-SSL..."
 				/usr/sbin/pop3d-ssl start
 				evaluate_retval
 			fi
@@ -109,7 +110,7 @@
 		if [ -f /etc/courier/imapd ]; then
 			. /etc/courier/imapd
 			if [ "${IMAPDSTART}" == "YES" ]; then
-				echo "     IMAP..."
+				boot_mesg "     IMAP..."
 				/usr/sbin/imapd start
 				evaluate_retval
 			fi
@@ -119,7 +120,7 @@
 		if [ -f /etc/courier/imapd-ssl ]; then
 			. /etc/courier/imapd-ssl
 			if [ "${IMAPDSSLSTART}" == "YES" ]; then
-				echo "     IMAP-SSL..."
+				boot_mesg "     IMAP-SSL..."
 				/usr/sbin/imapd-ssl start
 				evaluate_retval
 			fi
@@ -128,11 +129,12 @@
 
 
 	stop)
-		echo "Stopping Courier mail services:"
+		boot_mesg "Stopping Courier mail services:"
+		boot_mesg_flush
 
 		# IMAP SSL
 		if [ -f /var/run/courier/imapd-ssl.pid.lock ]; then
-			echo "     IMAP SSL..."
+			boot_mesg "     IMAP SSL..."
 			/usr/sbin/imapd-ssl stop
 			evaluate_retval
 			rm -f /var/run/courier/imapd-ssl.pid{,.lock}
@@ -140,7 +142,7 @@
 
 		# IMAP
 		if [ -f /var/run/courier/imapd.pid.lock ]; then
-			echo "     IMAP..."
+			boot_mesg "     IMAP..."
 			/usr/sbin/imapd stop
 			evaluate_retval
 			rm -f /var/run/courier/imapd.pid{,.lock}
@@ -148,7 +150,7 @@
 
 		# POP3 SSL
 		if [ -f /var/run/courier/pop3d-ssl.pid.lock ]; then
-			echo "     POP3 SSL..."
+			boot_mesg "     POP3 SSL..."
 			/usr/sbin/pop3d-ssl stop
 			evaluate_retval
 			rm -f /var/run/courier/pop3d-ssl.pid{,.lock}
@@ -156,7 +158,7 @@
 
 		# POP3
 		if [ -f /var/run/courier/pop3d.pid.lock ]; then
-			echo "     POP3..."
+			boot_mesg "     POP3..."
 			/usr/sbin/pop3d stop
 			evaluate_retval
 			rm /var/run/courier/pop3d.pid{,.lock}
@@ -164,7 +166,7 @@
 
 		# ESMTP SSL
 		if [ -f /var/run/courier/esmtpd-ssl.pid.lock ]; then
-			echo "     ESMTP SSL..."
+			boot_mesg "     ESMTP SSL..."
 			/usr/sbin/esmtpd-ssl stop
 			evaluate_retval
 			rm -f /var/run/courier/esmtpd-ssl.pid{,.lock}
@@ -172,7 +174,7 @@
 
 		# ESMTP MSA
 		if [ -f /var/run/courier/esmtpd-msa.pid.lock ]; then
-			echo "     ESMTP MSA..."
+			boot_mesg "     ESMTP MSA..."
 			/usr/sbin/esmtpd-msa stop
 			evaluate_retval
 			rm -f /var/run/courier/esmtpd-msa.pid{,.lock}
@@ -180,20 +182,20 @@
 
 		# ESMTP
 		if [ -f /var/run/courier/esmtpd.pid.lock ]; then
-			echo "     ESMTP..."
+			boot_mesg "     ESMTP..."
 			/usr/sbin/esmtpd stop
 			evaluate_retval
 			rm -f /var/run/courier/esmtpd.pid{,.lock}
 		fi
 
 		# Courier
-		echo "     Courier..."
+		boot_mesg "     Courier..."
 		/usr/sbin/courier stop
 		evaluate_retval
 
 		# Webmail
 		if [ -f /var/run/courier/sqwebmaild.pid.lock ]; then
-			echo "     Webmail..."
+			boot_mesg "     Webmail..."
 			/usr/sbin/webmaild stop
 			evaluate_retval
 			rm -f /var/run/courier/sqwebmaild.pid{,.lock,.pcp.lock}
@@ -201,20 +203,20 @@
 
 		# LDAP Alias
 		if [ -f /var/run/courier/ldapaliasd.lock ]; then
-			echo "     LDAP Alias..."
+			boot_mesg "     LDAP Alias..."
 			/usr/sbin/courierldapaliasd stop
 			evaluate_retval
 			rm -f /var/run/courier/ldapaliasd.lock
 		fi
 
 		# Authdaemon
-		echo "     Auth..."
+		boot_mesg "     Auth..."
 		/usr/lib/courier/authlib/authdaemond stop
 		evaluate_retval
 
 		# Courierfilter
 		if [ -f /var/run/courier/courierfilter.pid ]; then
-			echo "     Courierfilter..."
+			boot_mesg "     Courierfilter..."
 			/usr/sbin/courierfilter stop
 			evaluate_retval
 			rm -f /var/run/courier/courierfilter.pid

Modified: trunk/bootscripts/blfs/init.d/cyrus-sasl
===================================================================
--- trunk/bootscripts/blfs/init.d/cyrus-sasl	2005-07-08 06:21:36 UTC (rev 4693)
+++ trunk/bootscripts/blfs/init.d/cyrus-sasl	2005-07-09 00:31:19 UTC (rev 4694)
@@ -12,12 +12,12 @@
 
 case "$1" in
 	start)
-		echo "Starting the Cyrus SASL Server..."
+		boot_mesg "Starting the Cyrus SASL Server..."
 		loadproc /usr/sbin/saslauthd -a [authmech]
 		;;
 
 	stop)
-		echo "Stopping the Cyrus SASL Server..."
+		boot_mesg "Stopping the Cyrus SASL Server..."
 		killproc /usr/sbin/saslauthd
 		;;
 

Modified: trunk/bootscripts/blfs/init.d/exim
===================================================================
--- trunk/bootscripts/blfs/init.d/exim	2005-07-08 06:21:36 UTC (rev 4693)
+++ trunk/bootscripts/blfs/init.d/exim	2005-07-09 00:31:19 UTC (rev 4694)
@@ -12,12 +12,12 @@
 
 case "$1" in
 	start)
-		echo "Starting exim..."
+		boot_mesg "Starting exim..."
 		loadproc /usr/sbin/exim -bd -q15m
 		;;
 
 	stop)
-		echo "Stopping exim..."
+		boot_mesg "Stopping exim..."
 		killproc /usr/sbin/exim
 		;;
 

Modified: trunk/bootscripts/blfs/init.d/heimdal
===================================================================
--- trunk/bootscripts/blfs/init.d/heimdal	2005-07-08 06:21:36 UTC (rev 4693)
+++ trunk/bootscripts/blfs/init.d/heimdal	2005-07-09 00:31:19 UTC (rev 4694)
@@ -12,56 +12,65 @@
 
 case "$1" in
 	start)  
-		echo "Starting KDC Server Daemon..."
+		boot_mesg -n "Starting KDC Server Daemon..."
 		if test -f "/var/run/kdc.pid"
 		then
-			print_status warning running
+			boot_mesg "kdc already running!" ${WARNING}
+			echo_warning
 		else
 			/usr/sbin/kdc &
 			sleep 1
 			if test -f "/var/run/kdc.pid"
 			then
-				print_status success
+				echo ""
+				echo_ok
 			else
-				print_status failure
+				echo ""
+				echo_failure
 			fi
 		fi
-		echo "Starting KDC kpasswdd Daemon..."
+		boot_mesg -n "Starting KDC kpasswdd Daemon..."
 		if test -f "/var/run/kpasswdd.pid"
 		then
-			print_status warning running
+			boot_mesg "kpasswdd already running!" ${WARNING}
+			echo_warning
 		else
 			/usr/sbin/kpasswdd &
 			sleep 1
 			if test -f "/var/run/kpasswdd.pid"
 			then
-				print_status success
+				echo ""
+				echo_ok
 			else
-				print_status failure
+				echo ""
+				echo_failure
 			fi
 		fi
-		echo "Starting KDC kadmind Daemon..."
+		boot_mesg -n "Starting KDC kadmind Daemon..."
 		if test -f "/var/run/kadmind.pid"
 		then
-			print_status warning running
+			boot_mesg "kadmind already running!" ${WARNING}
+			echo_warning
 		else
 			/usr/sbin/kadmind &
 			sleep 1
 			if test -f "/var/run/kadmind.pid"
 			then
-				print_status success
+				echo ""
+				echo_ok
 			else
-				print_status failure
+				echo ""
+				echo_failure
 			fi
 		fi
 		;;
 
 	stop)   
-		echo "Stopping KDC kadmind Daemon..."
+		boot_mesg "Stopping KDC kadmind Daemon..."
 		killproc /usr/sbin/kadmind
-		echo "Stopping KDC kpasswdd Daemon..."
+		boot_mesg "Stopping KDC kpasswdd Daemon..."
 		killproc /usr/sbin/kpasswdd
-		echo "Stopping KDC Server Daemon..."
+		boot_mesg "Stopping KDC Server Daemon..."
 		killproc /usr/sbin/kdc
 		;;
 




More information about the blfs-book mailing list