SVN: rc-scripts/branches/upstart_native/rc.d: init.d/network init.d/random rc.sysinit

jajcus jajcus at pld-linux.org
Mon May 10 12:21:09 CEST 2010


Author: jajcus
Date: Mon May 10 12:21:09 2010
New Revision: 11418

Modified:
   rc-scripts/branches/upstart_native/rc.d/init.d/network
   rc-scripts/branches/upstart_native/rc.d/init.d/random
   rc-scripts/branches/upstart_native/rc.d/rc.sysinit
Log:
- --no-wait when emitting some signals, to prevent lock-ups on minor errors ('starting' events need to wait or they won't be useful)

Modified: rc-scripts/branches/upstart_native/rc.d/init.d/network
==============================================================================
--- rc-scripts/branches/upstart_native/rc.d/init.d/network	(original)
+++ rc-scripts/branches/upstart_native/rc.d/init.d/network	Mon May 10 12:21:09 2010
@@ -213,7 +213,7 @@
 	network_postinit
 
 	touch /var/lock/subsys/network
-	emit pld.network-started
+	emit --no-wait pld.network-started
 }
 
 stop() {
@@ -253,7 +253,7 @@
 	network_deinit
 
 	rm -f /var/lock/subsys/network
-	emit pld.network-stopped
+	emit --no-wait pld.network-stopped
 }
 
 # Reload all active interfaces

Modified: rc-scripts/branches/upstart_native/rc.d/init.d/random
==============================================================================
--- rc-scripts/branches/upstart_native/rc.d/init.d/random	(original)
+++ rc-scripts/branches/upstart_native/rc.d/init.d/random	Mon May 10 12:21:09 2010
@@ -39,7 +39,7 @@
 		touch /var/lock/subsys/random
 		deltext
 		ok
-		emit started JOB=random
+		emit --nowait started JOB=random
 	fi
 	;;
   stop)
@@ -55,7 +55,7 @@
 		rm -f /var/lock/subsys/random
 		deltext
 		ok
-		emit stopped JOB=random
+		emit --no-wait stopped JOB=random
 	fi
 	;;
   status)

Modified: rc-scripts/branches/upstart_native/rc.d/rc.sysinit
==============================================================================
--- rc-scripts/branches/upstart_native/rc.d/rc.sysinit	(original)
+++ rc-scripts/branches/upstart_native/rc.d/rc.sysinit	Mon May 10 12:21:09 2010
@@ -524,8 +524,8 @@
 		mount -f -t cpuset none /dev/cpuset
 	fi
 	
-	emit root-filesystem
-	emit virtual-filesystems
+	emit --no-wait root-filesystem
+	emit --no-wait virtual-filesystems
 
 	if [ ! -f /proc/modules ]; then
 		USEMODULES=
@@ -892,11 +892,11 @@
 		run_cmd "Turning on quotas for local filesystems" /sbin/quotaon -aug
 	fi
 
-	emit local-filesystems
+	emit --no-wait local-filesystems
 
 	# FIXME: this should be delayed until remote filesystems are mounted,
 	#        especialy when /usr or other standard fs is remote
-	emit filesystem
+	emit --no-wait filesystem
 
 	# Turn on process accounting
 	if [ -x /etc/rc.d/rc.acct ]; then
@@ -923,10 +923,10 @@
 	# ... and here finish configuring parameters
 	sysctl -e -p /etc/sysctl.conf > /dev/null 2>&1
 else
-	emit root-filesystem
-	emit virtual-filesystems
-	emit local-filesystems
-	emit filesystem
+	emit --no-wait root-filesystem
+	emit --no-wait virtual-filesystems
+	emit --no-wait local-filesystems
+	emit --no-wait filesystem
 
 	# /var/log should be writable now, so start saving the boot output
 	if [ "$RC_BOOTLOG" ]; then
@@ -996,7 +996,7 @@
 	run_cmd "Enabling swap space" true
 	# Right, now turn on swap in case we swap to files
 	swapon -a >/dev/null 2>&1
-	emit all-swaps
+	emit --no-wait all-swaps
 
 	# If a SCSI tape has been detected, load the st module unconditionally
 	# since many SCSI tapes don't deal well with st being loaded and unloaded
@@ -1023,7 +1023,7 @@
 	cp -f /var/log/dmesg /var/log/dmesg.0
 	chmod 0600 /var/log/dmesg /var/log/dmesg.0
 else
-	emit all-swaps
+	emit --no-wait all-swaps
 fi
 
 if ! is_no "$RC_PROMPT"; then
@@ -1048,5 +1048,5 @@
 fi
 echo
 
-emit pld.sysinit-done
+emit --no-wait pld.sysinit-done
 


More information about the pld-cvs-commit mailing list