Magellan Linux

Diff of /trunk/magellan-initscripts/etc/rc.d/init.d/mountfs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1256 by niro, Thu Nov 5 12:57:14 2009 UTC revision 1257 by niro, Fri Mar 11 17:31:31 2011 UTC
# Line 35  case "$1" in Line 35  case "$1" in
35    
36   elif [ -f /mnt/cdrom/livecdrootfs.sqsh ]   elif [ -f /mnt/cdrom/livecdrootfs.sqsh ]
37   then   then
38   mount -f /mnt/cdrom/livecdrootfs.sqsh /mnt/cloop -t ext2 -o ro   mount -f /mnt/cdrom/livecdrootfs.sqsh /mnt/cloop -t squashfs -o ro
39   fi   fi
40   else   else
41   echo -e ${COLOREDSTAR}"Remounting root file system in read-write mode ..."   rc_print "Remounting root file system in read-write mode ..."
42   mount -n -o remount,rw /   mount -n -o remount,rw /
43   evaluate_retval   evaluate_retval
44   fi   fi
45    
46   echo -e ${COLOREDSTAR}"Recording existing mounts in /etc/mtab ..."   rc_print "Recording existing mounts in /etc/mtab ..."
47   > /etc/mtab   > /etc/mtab
48    
49   mount -f / && mount -f /proc   mount -f / && mount -f /proc
# Line 67  case "$1" in Line 67  case "$1" in
67   mount -f -t ${udev_fstype} -o ${udev_mopts} udev /dev   mount -f -t ${udev_fstype} -o ${udev_mopts} udev /dev
68   fi   fi
69    
70     # records mdev as mounted
71     if is_fs_mounted mdev
72     then
73     # get the fstype of mdev - it may be ramfs or tmpfs
74     mdev_fstype="$(cat /proc/mounts | grep mdev | cut -d ' ' -f3)"
75     # get the right mount opts - mdev with tmpfs comes nosuid
76     mdev_mopts="$(cat /proc/mounts | grep mdev | cut -d ' ' -f4)"
77     mount -f -t ${mdev_fstype} -o ${mdev_mopts} mdev /dev
78     fi
79    
80   # records usbfs as mounted   # records usbfs as mounted
81   is_fs_mounted usbfs && mount -f -t usbfs usbfs /proc/bus/usb   is_fs_mounted usbfs && mount -f -t usbfs usbfs /proc/bus/usb
82    
# Line 77  case "$1" in Line 87  case "$1" in
87   # cannot be mounted at this time, add them to the NO_FS variable   # cannot be mounted at this time, add them to the NO_FS variable
88   # below. All file systems that are added to the variable in the   # below. All file systems that are added to the variable in the
89   # form of no<filesystem> will be skipped.   # form of no<filesystem> will be skipped.
90   NO_FS="nonfs,nosmbfs,noproc,nocoda,noncpfs,noshm"   NO_FS="noswap,nonfs,nosmbfs,noproc,nocoda,noncpfs,noshm"
91   echo -e ${COLOREDSTAR}"Mounting remaining file systems ..."   rc_print "Mounting remaining file systems ..."
92   mount -a -t $NO_FS   mount -a -t $NO_FS
93   evaluate_retval   evaluate_retval
94    
# Line 87  case "$1" in Line 97  case "$1" in
97   ;;   ;;
98    
99   stop)   stop)
100   echo -e ${COLOREDSTAR}"Unmounting all other currently mounted file systems ..."   rc_print "Unmounting all other currently mounted file systems ..."
101   if [ -e /dev/.udev ]   if [ -e /dev/.udev ]
102   then   then
103   NO_FS="noramfs"   NO_FS="noramfs,notmpfs,nodevtmpfs,nodevpts"
104   umount -a -r -d -t ${NO_FS}   umount -a -r -d -t ${NO_FS}
105   else   else
106   # -d, umount loop devices as well   # -d, umount loop devices as well
# Line 100  case "$1" in Line 110  case "$1" in
110    
111   if [ -e /.bootdev ] && [ -x /usr/bin/eject ]   if [ -e /.bootdev ] && [ -x /usr/bin/eject ]
112   then   then
113   echo -e ${COLOREDSTAR}"Trying to eject the live-media ..."   rc_print "Trying to eject the live-media ..."
114   eject -m /mnt/cdrom &> /dev/null   eject -m /mnt/cdrom &> /dev/null
115   evaluate_retval   evaluate_retval
116   fi   fi
# Line 110  case "$1" in Line 120  case "$1" in
120   ;;   ;;
121    
122   *)   *)
123   echo "Usage: $0 {start|stop}"   rc_echo "Usage: $0 {start|stop}"
124   exit 1   exit 1
125   ;;   ;;
126  esac  esac

Legend:
Removed from v.1256  
changed lines
  Added in v.1257