Magellan Linux

Contents of /trunk/magellan-initscripts/etc/rc.d/init.d/mountfslivecd

Parent Directory Parent Directory | Revision Log Revision Log


Revision 149 - (show annotations) (download)
Sun Jul 3 21:32:18 2005 UTC (18 years, 11 months ago) by niro
File size: 1932 byte(s)
using now new is_fs_mounted functions and fixed fstype descriptions

1 #!/bin/bash
2 # $Header: /home/cvsd/magellan-cvs/magellan-src/magellan-initscripts/etc/rc.d/init.d/mountfslivecd,v 1.4 2005-07-03 21:32:18 niro Exp $
3
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}"Recording existing mounts in /etc/mtab ..."
19 > /etc/mtab
20
21 # fake mounts rootfs (taken from /.bootdev)
22 if [ -e /.bootdev ]
23 then
24 source /.bootdev
25 mount -f ${BOOTDEV} /mnt/cdrom -t ${FSTYPE} -o ro
26 # we don't delete this for the alx settings import
27 # wanna check if usbstorage or not
28 # rm /.bootdev
29 fi
30
31 # fake mounts cloop, loop or sqsh
32 if [ -f /mnt/cdrom/livecdrootfs.loop ]
33 then
34 mount -f /mnt/cdrom/livecdrootfs.loop /mnt/cloop -t ext2 -o ro
35
36 elif [ -f /mnt/cdrom/livecdrootfs.cloop ]
37 then
38 mount -f /mnt/cdrom/livecdrootfs.cloop /mnt/cloop -t ext2 -o ro
39
40 elif [ -f /mnt/cdrom/livecdrootfs.sqsh ]
41 then
42 mount -f /mnt/cdrom/livecdrootfs.sqsh /mnt/cloop -t ext2 -o ro
43 fi
44
45 # records devfs as mounted
46 if is_fs_mounted devfs
47 then
48 mount -f -t devfs devfs /dev
49 fi
50
51 # records devpts as mounted
52 if is_fs_mounted devpts
53 then
54 mount -f -t devpts devpts /dev/pts
55 fi
56
57 # records sysfs as mounted
58 if is_fs_mounted sysfs
59 then
60 mount -f -t sysfs sysfs /sys
61 fi
62
63 # records udev as mounted
64 if is_fs_mounted udev
65 then
66 mount -f -t ramfs udev /dev
67 fi
68
69 # fake mounts tmpfs
70 mount -f tmpfs / -t tmpfs -o rw
71
72 # fake mounts proc
73 mount -f proc /proc -t proc -o rw
74
75 evaluate_retval
76
77 update_svcstatus $1
78 splash svc_started "$(basename $0)" 0
79 ;;
80
81 stop)
82 echo -e ${COLOREDSTAR}"Unmounting all other currently mounted file systems ..."
83 #umount /dev
84 #umount /proc
85 #umount /
86 #umount -a -r
87 evaluate_retval
88
89 update_svcstatus $1
90 splash svc_stopped "$(basename $0)" 0
91 ;;
92
93 *)
94 echo "Usage: $0 {start|stop}"
95 exit 1
96 ;;
97 esac

Properties

Name Value
svn:executable *