--- trunk/magellan-initscripts/etc/rc.d/init.d/mountfs 2011/03/11 17:24:12 1256 +++ trunk/magellan-initscripts/etc/rc.d/init.d/mountfs 2011/03/11 17:31:31 1257 @@ -35,15 +35,15 @@ elif [ -f /mnt/cdrom/livecdrootfs.sqsh ] then - mount -f /mnt/cdrom/livecdrootfs.sqsh /mnt/cloop -t ext2 -o ro + mount -f /mnt/cdrom/livecdrootfs.sqsh /mnt/cloop -t squashfs -o ro fi else - echo -e ${COLOREDSTAR}"Remounting root file system in read-write mode ..." + rc_print "Remounting root file system in read-write mode ..." mount -n -o remount,rw / evaluate_retval fi - echo -e ${COLOREDSTAR}"Recording existing mounts in /etc/mtab ..." + rc_print "Recording existing mounts in /etc/mtab ..." > /etc/mtab mount -f / && mount -f /proc @@ -67,6 +67,16 @@ mount -f -t ${udev_fstype} -o ${udev_mopts} udev /dev fi + # records mdev as mounted + if is_fs_mounted mdev + then + # get the fstype of mdev - it may be ramfs or tmpfs + mdev_fstype="$(cat /proc/mounts | grep mdev | cut -d ' ' -f3)" + # get the right mount opts - mdev with tmpfs comes nosuid + mdev_mopts="$(cat /proc/mounts | grep mdev | cut -d ' ' -f4)" + mount -f -t ${mdev_fstype} -o ${mdev_mopts} mdev /dev + fi + # records usbfs as mounted is_fs_mounted usbfs && mount -f -t usbfs usbfs /proc/bus/usb @@ -77,8 +87,8 @@ # cannot be mounted at this time, add them to the NO_FS variable # below. All file systems that are added to the variable in the # form of no will be skipped. - NO_FS="nonfs,nosmbfs,noproc,nocoda,noncpfs,noshm" - echo -e ${COLOREDSTAR}"Mounting remaining file systems ..." + NO_FS="noswap,nonfs,nosmbfs,noproc,nocoda,noncpfs,noshm" + rc_print "Mounting remaining file systems ..." mount -a -t $NO_FS evaluate_retval @@ -87,10 +97,10 @@ ;; stop) - echo -e ${COLOREDSTAR}"Unmounting all other currently mounted file systems ..." + rc_print "Unmounting all other currently mounted file systems ..." if [ -e /dev/.udev ] then - NO_FS="noramfs" + NO_FS="noramfs,notmpfs,nodevtmpfs,nodevpts" umount -a -r -d -t ${NO_FS} else # -d, umount loop devices as well @@ -100,7 +110,7 @@ if [ -e /.bootdev ] && [ -x /usr/bin/eject ] then - echo -e ${COLOREDSTAR}"Trying to eject the live-media ..." + rc_print "Trying to eject the live-media ..." eject -m /mnt/cdrom &> /dev/null evaluate_retval fi @@ -110,7 +120,7 @@ ;; *) - echo "Usage: $0 {start|stop}" + rc_echo "Usage: $0 {start|stop}" exit 1 ;; esac