]>
Commit | Line | Data |
---|---|---|
73d9a908 MT |
1 | #!/bin/sh |
2 | ######################################################################## | |
3 | # Begin $rc_base/init.d/mountfs | |
4 | # | |
5 | # Description : File System Mount Script | |
6 | # | |
7 | # Authors : Gerard Beekmans - gerard@linuxfromscratch.org | |
8 | # | |
9 | # Version : 00.00 | |
10 | # | |
11 | # Notes : | |
12 | # | |
13 | ######################################################################## | |
14 | ||
15 | . /etc/sysconfig/rc | |
16 | . ${rc_functions} | |
17 | ||
18 | case "${1}" in | |
19 | start) | |
20 | boot_mesg "Remounting root file system in read-write mode..." | |
21 | mount -n -o remount,rw / &>/dev/null | |
22 | evaluate_retval | |
23 | ||
24 | # Remove fsck-related file system watermarks. | |
25 | rm -f /fastboot /forcefsck | |
26 | ||
1ee33dda | 27 | boot_mesg "Create /etc/mtab..." |
73d9a908 MT |
28 | > /etc/mtab |
29 | mount -f / || failed=1 | |
73d9a908 MT |
30 | (exit ${failed}) |
31 | evaluate_retval | |
32 | ||
33 | # This will mount all filesystems that do not have _netdev in | |
34 | # their option list. _netdev denotes a network filesystem. | |
35 | boot_mesg "Mounting remaining file systems..." | |
36 | mount -a -O no_netdev &>/dev/null | |
37 | evaluate_retval | |
38 | ;; | |
39 | ||
40 | stop) | |
4de55e0b AF |
41 | boot_mesg "Syncing discs..." |
42 | sync && sync | |
5254aa51 AF |
43 | sleep 2 |
44 | sync && sync | |
4de55e0b AF |
45 | evaluate_retval |
46 | ||
73d9a908 MT |
47 | boot_mesg "Unmounting all other currently mounted file systems..." |
48 | umount -a -d -r &>/dev/null | |
49 | evaluate_retval | |
acddae55 | 50 | ;; |
73d9a908 MT |
51 | *) |
52 | echo "Usage: ${0} {start|stop}" | |
53 | exit 1 | |
54 | ;; | |
55 | esac | |
56 | ||
57 | # End $rc_base/init.d/mountfs |