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

jajcus jajcus at pld-linux.org
Thu May 6 11:34:21 CEST 2010


Author: jajcus
Date: Thu May  6 11:34:21 2010
New Revision: 11381

Modified:
   rc-scripts/branches/upstart_native/rc.d/init.d/network
Log:
- emit upstart events on network start/stop

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	Thu May  6 11:34:21 2010
@@ -193,6 +193,7 @@
 }
 
 start() {
+	emit pld.network-starting
 	rc_splash "bootnetwork start"
 	network_init
 
@@ -212,9 +213,11 @@
 	network_postinit
 
 	touch /var/lock/subsys/network
+	emit pld.network-started
 }
 
 stop() {
+	emit pld.network-stopping
 	# If we go to runlevel 0, 1 or 6 then umount all network fs
 	if [ "$RUNLEVEL" = "6" -o "$RUNLEVEL" = "0" -o "$RUNLEVEL" = "1" ]; then
 		if [ -x /etc/rc.d/init.d/netfs -a -f /var/lock/subsys/netfs ];
@@ -250,6 +253,7 @@
 	network_deinit
 
 	rm -f /var/lock/subsys/network
+	emit pld.network-stopped
 }
 
 # Reload all active interfaces
@@ -330,7 +334,9 @@
 case "$1" in
   start)
 	if is_yes "$VSERVER"; then
+		emit pld.network-starting
 		touch /var/lock/subsys/network
+		emit pld.network-started
 		exit 0
 	fi
   	start
@@ -338,7 +344,9 @@
 
   stop)
 	if is_yes "$VSERVER"; then
+		emit pld.network-stopping
 		rm -f /var/lock/subsys/network
+		emit pld.network-stopped
 		exit 0
 	fi
 	stop


More information about the pld-cvs-commit mailing list