38 |
mount -f /mnt/cdrom/livecdrootfs.sqsh /mnt/cloop -t ext2 -o ro |
mount -f /mnt/cdrom/livecdrootfs.sqsh /mnt/cloop -t ext2 -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 |
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 |
|
|
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="noswap,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 |
|
|
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,notmpfs" |
NO_FS="noramfs,notmpfs,nodevtmpfs" |
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 |
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 |