Steve Langasek has proposed merging lp:~vorlon/upstart/debian-bug-659540 into
lp:upstart.
Requested reviews:
Upstart Reviewers (upstart-reviewers)
For more details, see:
https://code.launchpad.net/~vorlon/upstart/debian-bug-659540/+merge/122349
Self-explanatory fix for compatibilty with the new initctl path used by
sysvinit in Debian wheezy.
--
https://code.launchpad.net/~vorlon/upstart/debian-bug-659540/+merge/122349
Your team Upstart Reviewers is requested to review the proposed merge of
lp:~vorlon/upstart/debian-bug-659540 into lp:upstart.
=== modified file 'util/shutdown.c'
--- util/shutdown.c 2010-12-20 09:46:30 +0000
+++ util/shutdown.c 2012-08-31 19:46:19 +0000
@@ -80,6 +80,14 @@
#define DEV_INITCTL "/dev/initctl"
#endif
+/**
+ * RUN_INITCTL:
+ *
+ * System V init control socket (new location).
+ **/
+#ifndef RUN_INITCTL
+#define RUN_INITCTL "/run/initctl"
+#endif
/* Prototypes for option functions */
static int runlevel_option (NihOption *option, const char *arg);
@@ -819,9 +827,13 @@
sigemptyset (&act.sa_mask);
sigaction (SIGALRM, &act, NULL);
- /* Try and open /dev/initctl */
alarm (3);
- fd = open (DEV_INITCTL, O_WRONLY | O_NDELAY | O_NOCTTY);
+ /* Try and open /run/initctl */
+ fd = open (RUN_INITCTL, O_WRONLY | O_NDELAY | O_NOCTTY);
+ if (fd < 0) {
+ /* Fall back to /dev/initctl */
+ fd = open (DEV_INITCTL, O_WRONLY | O_NDELAY | O_NOCTTY);
+ }
if (fd >= 0) {
if (write (fd, &request, sizeof (request)) == sizeof (request))
exit (0);
--
upstart-devel mailing list
[email protected]
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/upstart-devel