Annotation of /trunk/magellan-initscripts/rc/mountfs
Parent Directory | Revision Log
Revision 149 -
(hide annotations)
(download)
Sun Jul 3 21:32:18 2005 UTC (19 years, 2 months ago) by niro
Original Path: trunk/magellan-initscripts/etc/rc.d/init.d/mountfs
File size: 1863 byte(s)
Sun Jul 3 21:32:18 2005 UTC (19 years, 2 months ago) by niro
Original Path: trunk/magellan-initscripts/etc/rc.d/init.d/mountfs
File size: 1863 byte(s)
using now new is_fs_mounted functions and fixed fstype descriptions
1 | niro | 2 | #!/bin/bash |
2 | niro | 149 | # $Header: /home/cvsd/magellan-cvs/magellan-src/magellan-initscripts/etc/rc.d/init.d/mountfs,v 1.4 2005-07-03 21:32:06 niro Exp $ |
3 | niro | 2 | |
4 | #%rlevels: 7:s 0:k 6:k | ||
5 | #%start: 40 | ||
6 | #%stop: 60 | ||
7 | |||
8 | #deps | ||
9 | #%needs: | ||
10 | #%before: | ||
11 | #%after: | ||
12 | |||
13 | source /etc/sysconfig/rc | ||
14 | source $rc_functions | ||
15 | |||
16 | case "$1" in | ||
17 | start) | ||
18 | echo -e ${COLOREDSTAR}"Remounting root file system in read-write mode ..." | ||
19 | mount -n -o remount,rw / | ||
20 | evaluate_retval | ||
21 | |||
22 | echo -e ${COLOREDSTAR}"Recording existing mounts in /etc/mtab ..." | ||
23 | > /etc/mtab | ||
24 | mount -f / && mount -f /proc | ||
25 | niro | 71 | |
26 | niro | 149 | # records devfs as mounted |
27 | if is_fs_mounted devfs | ||
28 | niro | 2 | then |
29 | niro | 149 | mount -f -t devfs devfs /dev |
30 | niro | 2 | fi |
31 | niro | 71 | |
32 | niro | 149 | # records devpts as mounted |
33 | if is_fs_mounted devpts | ||
34 | niro | 2 | then |
35 | niro | 149 | mount -f -t devpts devpts /dev/pts |
36 | niro | 2 | fi |
37 | |||
38 | niro | 149 | # records sysfs as mounted |
39 | if is_fs_mounted sysfs | ||
40 | niro | 2 | then |
41 | niro | 149 | mount -f -t sysfs sysfs /sys |
42 | niro | 2 | fi |
43 | niro | 71 | |
44 | niro | 149 | # records udev as mounted |
45 | if is_fs_mounted udev | ||
46 | niro | 2 | then |
47 | niro | 149 | mount -f -t ramfs udev /dev |
48 | niro | 2 | fi |
49 | |||
50 | evaluate_retval | ||
51 | |||
52 | # The following mount command will mount all file systems. If you | ||
53 | # have other (network based) file system that should not be or | ||
54 | # cannot be mounted at this time, add them to the NO_FS variable | ||
55 | # below. All file systems that are added to the variable in the | ||
56 | # form of no<filesystem> will be skipped. | ||
57 | |||
58 | NO_FS="nonfs,nosmbfs,noproc,nocoda,noncpfs,noshm" | ||
59 | echo -e ${COLOREDSTAR}"Mounting remaining file systems ..." | ||
60 | mount -a -t $NO_FS | ||
61 | evaluate_retval | ||
62 | |||
63 | update_svcstatus $1 | ||
64 | splash svc_started "$(basename $0)" 0 | ||
65 | ;; | ||
66 | |||
67 | stop) | ||
68 | echo -e ${COLOREDSTAR}"Unmounting all other currently mounted file systems ..." | ||
69 | if [ -e /dev/.udev ] | ||
70 | then | ||
71 | NO_FS="noramfs" | ||
72 | umount -a -r -d -t ${NO_FS} | ||
73 | else | ||
74 | # -d, umount loop devices as well | ||
75 | umount -a -r -d | ||
76 | fi | ||
77 | evaluate_retval | ||
78 | |||
79 | update_svcstatus $1 | ||
80 | splash svc_stopped "$(basename $0)" 0 | ||
81 | ;; | ||
82 | |||
83 | *) | ||
84 | echo "Usage: $0 {start|stop}" | ||
85 | exit 1 | ||
86 | ;; | ||
87 | esac |
Properties
Name | Value |
---|---|
svn:executable | * |