r4691 - trunk/bootscripts/blfs/init.d

dj at linuxfromscratch.org dj at linuxfromscratch.org
Thu Jul 7 22:10:23 PDT 2005


Author: dj
Date: 2005-07-07 23:10:22 -0600 (Thu, 07 Jul 2005)
New Revision: 4691

Modified:
   trunk/bootscripts/blfs/init.d/openldap1
   trunk/bootscripts/blfs/init.d/openldap2
   trunk/bootscripts/blfs/init.d/portmap
   trunk/bootscripts/blfs/init.d/postfix
   trunk/bootscripts/blfs/init.d/postgresql
   trunk/bootscripts/blfs/init.d/proftpd
   trunk/bootscripts/blfs/init.d/random
   trunk/bootscripts/blfs/init.d/rsyncd
Log:
New functions round three...

Modified: trunk/bootscripts/blfs/init.d/openldap1
===================================================================
--- trunk/bootscripts/blfs/init.d/openldap1	2005-07-08 05:07:04 UTC (rev 4690)
+++ trunk/bootscripts/blfs/init.d/openldap1	2005-07-08 05:10:22 UTC (rev 4691)
@@ -14,17 +14,17 @@
 
 case "$1" in
 	start)
-		echo "Starting LDAP slapd Server..."
+		boot_mesg "Starting LDAP slapd Server..."
 		PIDFILE="/srv/ldap/run/slapd.pid"
 		loadproc /usr/sbin/slapd
 		;;
 
 	stop)
-		echo "Stopping LDAP slapd Server..."
-        PIDFILE="/srv/ldap/run/slapd.pid"
-        # slapd needs SIGINT
-        STOPSIG="INT"
-        killproc
+		boot_mesg "Stopping LDAP slapd Server..."
+		PIDFILE="/srv/ldap/run/slapd.pid"
+		# slapd needs SIGINT
+		STOPSIG="INT"
+		killproc -p ${PIDFILE} /usr/sbin/slapd
 		;;
 
 	restart)

Modified: trunk/bootscripts/blfs/init.d/openldap2
===================================================================
--- trunk/bootscripts/blfs/init.d/openldap2	2005-07-08 05:07:04 UTC (rev 4690)
+++ trunk/bootscripts/blfs/init.d/openldap2	2005-07-08 05:10:22 UTC (rev 4691)
@@ -14,30 +14,30 @@
 
 case "$1" in
 	start)
-		echo "Starting LDAP slapd Server..."
-        PIDFILE="/srv/ldap/run/slapd.pid"
-        loadproc /usr/sbin/slapd
-        # Return PIDFILE to null (for slurpd)
-        PIDFILE=""
+		boot_mesg "Starting LDAP slapd Server..."
+		PIDFILE="/srv/ldap/run/slapd.pid"
+		loadproc /usr/sbin/slapd
+		# Return PIDFILE to null (for slurpd)
+		PIDFILE=""
 
-        echo "Starting LDAP slurpd Server..."
-        loadproc /usr/sbin/slurpd                                        
+		boot_mesg "Starting LDAP slurpd Server..."
+		loadproc /usr/sbin/slurpd                                        
 		;;
 
 	stop)
-		echo "Stopping LDAP slapd Server..."
-        PIDFILE="/srv/ldap/run/slapd.pid"
-        # slapd needs SIGINT
-        TEMPSTOPSIG="$STOPSIG"
-        STOPSIG="INT"
-        killproc
+		boot_mesg "Stopping LDAP slapd Server..."
+		PIDFILE="/srv/ldap/run/slapd.pid"
+		# slapd needs SIGINT
+		TEMPSTOPSIG="$STOPSIG"
+		STOPSIG="INT"
+		killproc -p ${PIDFILE} /usr/sbin/slapd
 
-        # return STOPSIG to it's previous value
-        STOPSIG="$TEMPSTOPSIG"
-        # return PIDFILE to nothing for slurpd
-        PIDFILE=""
+		# return STOPSIG to it's previous value
+		STOPSIG="$TEMPSTOPSIG"
+		# return PIDFILE to nothing for slurpd
+		PIDFILE=""
 
-		echo "Stopping LDAP slurpd Server..."
+		boot_mesg "Stopping LDAP slurpd Server..."
 		killproc /usr/sbin/slurpd
 		;;
 

Modified: trunk/bootscripts/blfs/init.d/portmap
===================================================================
--- trunk/bootscripts/blfs/init.d/portmap	2005-07-08 05:07:04 UTC (rev 4690)
+++ trunk/bootscripts/blfs/init.d/portmap	2005-07-08 05:10:22 UTC (rev 4691)
@@ -9,12 +9,12 @@
 
 case "$1" in
 	start)
-		echo "Starting RPC Portmap"
+		boot_mesg "Starting RPC Portmap"
 		loadproc /sbin/portmap
 		;;
 
 	stop)
-		echo "Stopping Portmap"
+		boot_mesg "Stopping Portmap"
 		killproc /sbin/portmap
 		;;
 

Modified: trunk/bootscripts/blfs/init.d/postfix
===================================================================
--- trunk/bootscripts/blfs/init.d/postfix	2005-07-08 05:07:04 UTC (rev 4690)
+++ trunk/bootscripts/blfs/init.d/postfix	2005-07-08 05:10:22 UTC (rev 4691)
@@ -12,32 +12,32 @@
 
 case "$1" in
 	start)
-		echo "Starting Postfix..."
+		boot_mesg "Starting Postfix..."
 		loadproc /usr/sbin/postfix start
 		;;
 
 	stop)
-		echo "Stopping Postfix..."
+		boot_mesg "Stopping Postfix..."
 		loadproc /usr/sbin/postfix stop
 		;;
 
 	reload)
-		echo "Reloading Postfix..."
+		boot_mesg "Reloading Postfix..."
 		loadproc /usr/sbin/postfix reload
 		;;
 
 	abort)
-		echo "Aborting Postfix..."
+		boot_mesg "Aborting Postfix..."
 		loadproc /usr/sbin/postfix abort
 		;;
 
 	flush)
-		echo "Flushing Postfix..."
+		boot_mesg "Flushing Postfix..."
 		loadproc /usr/sbin/postfix flush
 		;;
 
 	check)
-		echo "Checking Postfix..."
+		boot_mesg "Checking Postfix..."
 		loadproc /usr/sbin/postfix check
 		;;
 

Modified: trunk/bootscripts/blfs/init.d/postgresql
===================================================================
--- trunk/bootscripts/blfs/init.d/postgresql	2005-07-08 05:07:04 UTC (rev 4690)
+++ trunk/bootscripts/blfs/init.d/postgresql	2005-07-08 05:10:22 UTC (rev 4691)
@@ -12,14 +12,14 @@
 
 case "$1" in
 	start)
-		echo "Starting PostgreSQL daemon..."
+		boot_mesg "Starting PostgreSQL daemon..."
 		su - postgres -c '/usr/bin/pg_ctl start -W -D /srv/pgsql/data \
 				-l /srv/pgsql/data/logfile -o "-i" '
 		evaluate_retval
 		;;
 
 	stop)
-		echo "Stopping PostgreSQL daemon..."
+		boot_mesg "Stopping PostgreSQL daemon..."
 		su - postgres -c "/usr/bin/pg_ctl stop -m smart -D /srv/pgsql/data"
 		evaluate_retval
 		;;

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

Modified: trunk/bootscripts/blfs/init.d/random
===================================================================
--- trunk/bootscripts/blfs/init.d/random	2005-07-08 05:07:04 UTC (rev 4690)
+++ trunk/bootscripts/blfs/init.d/random	2005-07-08 05:10:22 UTC (rev 4691)
@@ -13,7 +13,7 @@
 
 case "$1" in
 	start)
-		echo "Initializing kernel random number generator..."
+		boot_mesg "Initializing kernel random number generator..."
 		if [ -f /var/tmp/random-seed ]; then
 			/bin/cat /var/tmp/random-seed >/dev/urandom
 		fi
@@ -23,7 +23,7 @@
 		;;
 
 	stop)
-		echo "Saving random seed..."
+		boot_mesg "Saving random seed..."
 		/bin/dd if=/dev/urandom of=/var/tmp/random-seed \
 			count=1 &>/dev/null
 		evaluate_retval

Modified: trunk/bootscripts/blfs/init.d/rsyncd
===================================================================
--- trunk/bootscripts/blfs/init.d/rsyncd	2005-07-08 05:07:04 UTC (rev 4690)
+++ trunk/bootscripts/blfs/init.d/rsyncd	2005-07-08 05:10:22 UTC (rev 4691)
@@ -12,17 +12,17 @@
 
 case "$1" in
 	start)
-		echo "Starting RSYNC Server..."
+		boot_mesg "Starting RSYNC Server..."
 		loadproc /usr/bin/rsync --daemon --compress
 		;;
 
 	stop)
-		echo "Stopping RSYNC Server..."
+		boot_mesg "Stopping RSYNC Server..."
 		killproc /usr/bin/rsync
 		;;
 
 	reload)
-		echo "Reloading RSYNC Server..."
+		boot_mesg "Reloading RSYNC Server..."
 		reloadproc /usr/bin/rsync
 		;;
 




More information about the blfs-book mailing list