diff options
author | Bill Nottingham <notting@redhat.com> | 2008-03-10 23:23:55 -0400 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2008-03-10 23:23:55 -0400 |
commit | 60e464627b1db3def07543df31af2e5e09ce9b3e (patch) | |
tree | 64e243c8f5673a82959815c22067732880b37ddf /rc.d/rc | |
parent | 5d38179c29282bca01a53480ce9c5ac7cf25fbc4 (diff) | |
download | initscripts-60e464627b1db3def07543df31af2e5e09ce9b3e.tar initscripts-60e464627b1db3def07543df31af2e5e09ce9b3e.tar.gz initscripts-60e464627b1db3def07543df31af2e5e09ce9b3e.tar.bz2 initscripts-60e464627b1db3def07543df31af2e5e09ce9b3e.tar.xz initscripts-60e464627b1db3def07543df31af2e5e09ce9b3e.zip |
Add some minor upstart event notification for sysv scripts. (#431231)
Diffstat (limited to 'rc.d/rc')
-rwxr-xr-x | rc.d/rc | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -37,7 +37,8 @@ do_confirm="no" if [ -f /var/run/confirm ]; then do_confirm="yes" fi - +UPSTART= +[ -x /sbin/initctl ] && UPSTART=yes # See if we want to be in user confirmation mode if [ "$previous" = "N" ]; then if [ "$do_confirm" = "yes" ]; then @@ -70,7 +71,9 @@ for i in /etc/rc$runlevel.d/K* ; do check_runlevel "$i" || continue # Bring the subsystem down. + [ -n "$UPSTART" ] && initctl emit --quiet "stopping $subsys" $i stop + [ -n "$UPSTART" ] && initctl emit --quiet "stopped $subsys" done # Now run the START scripts. @@ -97,11 +100,13 @@ for i in /etc/rc$runlevel.d/S* ; do update_boot_stage "$subsys" # Bring the subsystem up. + [ -n "$UPSTART" ] && initctl emit --quiet "starting $subsys" if [ "$subsys" = "halt" -o "$subsys" = "reboot" ]; then export LC_ALL=C exec $i start fi $i start + [ -n "$UPSTART" ] && initctl emit --quiet "started $subsys" done [ "$do_confirm" = "yes" ] && rm -f /var/run/confirm if [ "$GRAPHICAL" = "yes" ]; then |