Diff
Modified: trunk/launchd/src/Makefile.am (23117 => 23118)
--- trunk/launchd/src/Makefile.am 2007-02-27 22:28:29 UTC (rev 23117)
+++ trunk/launchd/src/Makefile.am 2007-02-28 23:39:18 UTC (rev 23118)
@@ -34,7 +34,7 @@
sbin_PROGRAMS = launchd SystemStarter
libexec_PROGRAMS = launchproxy
-sysconf_DATA = hostconfig rc.common rc.netboot rc.shutdown
+sysconf_DATA = hostconfig rc.common rc.netboot
launchctl_CFLAGS = $(AM_CFLAGS) -I/System/Library/Frameworks/System.framework/PrivateHeaders
launchctl_LDFLAGS = -framework CoreFoundation -framework IOKit -weak_library /usr/lib/libedit.dylib
Modified: trunk/launchd/src/Makefile.in (23117 => 23118)
--- trunk/launchd/src/Makefile.in 2007-02-27 22:28:29 UTC (rev 23117)
+++ trunk/launchd/src/Makefile.in 2007-02-28 23:39:18 UTC (rev 23118)
@@ -235,7 +235,7 @@
@LIBS_ONLY_TRUE@liblaunch_profile_a_CFLAGS = -pg $(AM_CFLAGS)
@LIBS_ONLY_TRUE@liblaunch_profile_a_SOURCES = liblaunch.c libvproc.c libbootstrap.c protocol_vprocUser.c
@LIBS_ONLY_FALSE@sbin_SCRIPTS = service
-@LIBS_ONLY_FALSE@sysconf_DATA = hostconfig rc.common rc.netboot rc.shutdown
+@LIBS_ONLY_FALSE@sysconf_DATA = hostconfig rc.common rc.netboot
@LIBS_ONLY_FALSE@launchctl_CFLAGS = $(AM_CFLAGS) -I/System/Library/Frameworks/System.framework/PrivateHeaders
@LIBS_ONLY_FALSE@launchctl_LDFLAGS = -framework CoreFoundation -framework IOKit -weak_library /usr/lib/libedit.dylib
@LIBS_ONLY_FALSE@SystemStarter_CFLAGS = -mdynamic-no-pic $(AM_CFLAGS)
Modified: trunk/launchd/src/SystemStarter.c (23117 => 23118)
--- trunk/launchd/src/SystemStarter.c 2007-02-27 22:28:29 UTC (rev 23117)
+++ trunk/launchd/src/SystemStarter.c 2007-02-28 23:39:18 UTC (rev 23118)
@@ -163,6 +163,12 @@
assert(r != -1);
assert(kev.filter == EVFILT_SIGNAL && kev.ident == SIGTERM);
+ if (stat("/etc/rc.shutdown.local", &sb) != -1) {
+ const char *rc_shutdown_local_cmd[] = { "_PATH_BSHELL", "/etc/rc.shutdown.local", NULL };
+
+ fwexec(rc_shutdown_local_cmd, true);
+ }
+
system_starter(kActionStop, NULL);
exit(EXIT_SUCCESS);
Modified: trunk/launchd/src/com.apple.SystemStarter.plist (23117 => 23118)
--- trunk/launchd/src/com.apple.SystemStarter.plist 2007-02-27 22:28:29 UTC (rev 23117)
+++ trunk/launchd/src/com.apple.SystemStarter.plist 2007-02-28 23:39:18 UTC (rev 23118)
@@ -12,6 +12,8 @@
<dict>
<key>/etc/rc.local</key>
<true/>
+ <key>/etc/rc.shutdown.local</key>
+ <true/>
</dict>
</dict>
<key>QueueDirectories</key>
Deleted: trunk/launchd/src/rc.shutdown (23117 => 23118)
--- trunk/launchd/src/rc.shutdown 2007-02-27 22:28:29 UTC (rev 23117)
+++ trunk/launchd/src/rc.shutdown 2007-02-28 23:39:18 UTC (rev 23118)
@@ -1,8 +0,0 @@
-#!/bin/sh
-# Copyright 1997-2004 Apple Computer, Inc.
-
-. /etc/rc.common
-
-if [ -f /etc/rc.shutdown.local ]; then
- exec sh /etc/rc.shutdown.local
-fi