diff options
Diffstat (limited to 'init/poweroff.c')
-rw-r--r-- | init/poweroff.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/init/poweroff.c b/init/poweroff.c deleted file mode 100644 index b79bcd036..000000000 --- a/init/poweroff.c +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | ||
2 | /* | ||
3 | * Mini poweroff implementation for busybox | ||
4 | * | ||
5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> | ||
6 | * | ||
7 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | ||
8 | */ | ||
9 | |||
10 | #include <signal.h> | ||
11 | #include <stdlib.h> | ||
12 | #include <unistd.h> | ||
13 | #include <getopt.h> | ||
14 | #include <sys/reboot.h> | ||
15 | #include "busybox.h" | ||
16 | #include "init_shared.h" | ||
17 | |||
18 | |||
19 | extern int poweroff_main(int argc, char **argv) | ||
20 | { | ||
21 | char *delay; /* delay in seconds before rebooting */ | ||
22 | |||
23 | if(bb_getopt_ulflags(argc, argv, "d:", &delay)) { | ||
24 | sleep(atoi(delay)); | ||
25 | } | ||
26 | |||
27 | return ENABLE_INIT ? kill(1,SIGUSR2) : bb_shutdown_system(RB_POWER_OFF); | ||
28 | } | ||