aboutsummaryrefslogtreecommitdiff
path: root/init/halt.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-04-12 15:59:35 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-04-12 15:59:35 +0000
commite12c90217b8de612d2dfa429a71ad458b1754cf1 (patch)
tree793d80cc84f4b956c0f3fe2e78f1f97fc59d4e99 /init/halt.c
parent51056b382a003146c879c9d50552d344f298d957 (diff)
downloadbusybox-e12c90217b8de612d2dfa429a71ad458b1754cf1.tar.gz
halt/reboot/powerdown: accept and ignore -i
Diffstat (limited to 'init/halt.c')
-rw-r--r--init/halt.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/init/halt.c b/init/halt.c
index 62f93c5cd..3a23ecabb 100644
--- a/init/halt.c
+++ b/init/halt.c
@@ -63,9 +63,11 @@ int halt_main(int argc UNUSED_PARAM, char **argv)
/* Parse and handle arguments */
opt_complementary = "d+"; /* -d N */
- /* We support -w even if !ENABLE_FEATURE_WTMP, in order
- * to not break scripts */
- flags = getopt32(argv, "d:nfw", &delay);
+ /* We support -w even if !ENABLE_FEATURE_WTMP,
+ * in order to not break scripts.
+ * -i (shut down network interfaces) is ignored.
+ */
+ flags = getopt32(argv, "d:nfwi", &delay);
sleep(delay);
@@ -89,10 +91,12 @@ int halt_main(int argc UNUSED_PARAM, char **argv)
if (ENABLE_FEATURE_CLEAN_UP)
free(pidlist);
}
- if (rc)
+ if (rc) {
rc = kill(1, signals[which]);
- } else
+ }
+ } else {
rc = reboot(magic[which]);
+ }
if (rc)
bb_perror_nomsg_and_die();