diff options
Diffstat (limited to 'urunlevel/runlevel/remote_fs.c')
-rw-r--r-- | urunlevel/runlevel/remote_fs.c | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/urunlevel/runlevel/remote_fs.c b/urunlevel/runlevel/remote_fs.c new file mode 100644 index 0000000..6da11f5 --- /dev/null +++ b/urunlevel/runlevel/remote_fs.c | |||
@@ -0,0 +1,83 @@ | |||
1 | /* | ||
2 | * Mini remote_fs boot 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 | static int start(struct init_d_handle_s *, int); | ||
30 | static int status(struct init_d_handle_s *, int); | ||
31 | static int stop(struct init_d_handle_s *, int); | ||
32 | |||
33 | |||
34 | static init_d_handle_t my_commands = | ||
35 | { | ||
36 | &start, | ||
37 | &stop, | ||
38 | NULL, | ||
39 | NULL, | ||
40 | &no_reload, | ||
41 | NULL, | ||
42 | &status, | ||
43 | NULL, | ||
44 | "remote_fs", | ||
45 | NULL, | ||
46 | NULL, | ||
47 | NULL, | ||
48 | INIT_D_BEGIN \ | ||
49 | INIT_D_PROV "$remote_fs" \ | ||
50 | INIT_D_RSTART "$network" \ | ||
51 | INIT_D_SSTART "nfs smbfs codafs" \ | ||
52 | INIT_D_DSTART "3 4 5" \ | ||
53 | INIT_D_DSTOP "0 1 2 6" \ | ||
54 | INIT_D_SDESC "Mount all remote file systems." \ | ||
55 | INIT_D_DESC "Mount all remote file systems. Actually, this is just a" \ | ||
56 | INIT_D_CONT "dummy that depends on all the init scripts that could" \ | ||
57 | INIT_D_CONT "possibly mount remote file systems." \ | ||
58 | INIT_D_END | ||
59 | }; | ||
60 | |||
61 | |||
62 | int remote_fs_main(int argc, char **argv) | ||
63 | { | ||
64 | return do_init_from_main(argc, argv, &my_commands); | ||
65 | } | ||
66 | |||
67 | |||
68 | static int start(struct init_d_handle_s *init_d, int just_checking) | ||
69 | { | ||
70 | return INIT_D_OK; | ||
71 | } | ||
72 | |||
73 | |||
74 | static int status(struct init_d_handle_s *init_d, int quiet) | ||
75 | { | ||
76 | return print_status(init_d, quiet, INIT_D_STATUS_OK); | ||
77 | } | ||
78 | |||
79 | |||
80 | static int stop(struct init_d_handle_s *init_d, int just_checking) | ||
81 | { | ||
82 | return INIT_D_OK; | ||
83 | } | ||