diff options
Diffstat (limited to 'urunlevel/runlevel/remove_initd.c')
-rw-r--r-- | urunlevel/runlevel/remove_initd.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/urunlevel/runlevel/remove_initd.c b/urunlevel/runlevel/remove_initd.c new file mode 100644 index 0000000..1224b03 --- /dev/null +++ b/urunlevel/runlevel/remove_initd.c | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * Mini remove_initd implementation for busybox. | ||
3 | * | ||
4 | * Copyright (C) 2005 by David Seikel won_fang@yahoo.com.au | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
19 | * 02111-1307 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | #include <unistd.h> | ||
24 | |||
25 | #include "busybox.h" | ||
26 | #include "lib_init_d.h" | ||
27 | |||
28 | |||
29 | int remove_initd_main(int argc, char **argv) | ||
30 | { | ||
31 | llist_t *sorted = NULL; | ||
32 | llist_t *unsorted = get_scripts(); | ||
33 | |||
34 | // Should remove this script from unsorted. | ||
35 | sorted = sort_scripts(unsorted); | ||
36 | // Should return 1 if there are unsatisfied dependencies if this is removed. | ||
37 | return EXIT_SUCCESS; | ||
38 | } | ||