Magellan Linux

Annotation of /trunk/initscripts/busybox/rc/mountfs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1790 - (hide annotations) (download)
Mon Apr 2 11:27:49 2012 UTC (12 years, 1 month ago) by niro
File size: 1722 byte(s)
-added devtmpfs to NO_FS
1 niro 724 #!/bin/sh
2 niro 735 # $Header: /home/cvsd/magellan-cvs/magellan-src/busybox-initscripts/rc/mountfs,v 1.2 2008-06-10 23:08:56 niro Exp $
3 niro 724
4     #%rlevels: 7:s 0:k
5     #%start: 40
6 niro 1416 #%stop: 90
7 niro 724
8     #deps
9     #%needs:
10     #%before:
11     #%after:
12    
13     source /etc/conf.d/rc
14     source ${rc_functions}
15    
16     case "$1" in
17     start)
18 niro 1228 if [ ! -e /.bootdev ]
19 niro 724 then
20 niro 1168 rc_print "Remounting root file system in read-write mode ..."
21 niro 724 mount -n -o remount,rw /
22     evaluate_retval
23     fi
24    
25 niro 1228 if [[ ! -L /etc/mtab ]] || [[ $(readlink /etc/mtab) != /proc/mounts ]]
26 niro 724 then
27 niro 1228 rc_print "Recording existing mounts in /etc/mtab ..."
28     ln -snf /proc/mounts /etc/mtab
29     evaluate_retval
30 niro 724 fi
31    
32     # The following mount command will mount all file systems. If you
33     # have other (network based) file system that should not be or
34     # cannot be mounted at this time, add them to the NO_FS variable
35     # below. All file systems that are added to the variable in the
36     # form of no<filesystem> will be skipped.
37 niro 1790 NO_FS="noswap,nonfs,nosmbfs,noproc,nocoda,noncpfs,noshm,nodevtmpfs"
38 niro 1168 rc_print "Mounting remaining file systems ..."
39 niro 724 mount -a -t $NO_FS
40     evaluate_retval
41    
42     update_svcstatus $1
43     splash svc_started "$(basename $0)" 0
44     ;;
45    
46     stop)
47 niro 1168 rc_print "Unmounting all other currently mounted file systems ..."
48 niro 724 if [ -e /dev/.udev ]
49     then
50 niro 1416 NO_FS="noramfs,notmpfs,nodevtmpfs,nodevpts,noproc"
51 niro 724 umount -a -r -d -t ${NO_FS}
52     else
53     # -d, umount loop devices as well
54     umount -a -r -d
55     fi
56     evaluate_retval
57    
58     if [ -e /.bootdev ] && [ -x /usr/bin/eject ]
59     then
60 niro 1168 rc_print "Trying to eject the live-media ..."
61 niro 724 eject -m /mnt/cdrom &> /dev/null
62     evaluate_retval
63     fi
64    
65     update_svcstatus $1
66     splash svc_stopped "$(basename $0)" 0
67     ;;
68    
69     *)
70 niro 1196 rc_echo "Usage: $0 {start|stop}"
71 niro 724 exit 1
72     ;;
73     esac