Contents of /trunk/magellan-initscripts/etc/rc.d/init.d/mountfslivecd
Parent Directory | Revision Log
Revision 220 -
(show annotations)
(download)
Wed Aug 31 21:45:02 2005 UTC (18 years, 9 months ago) by niro
File size: 2019 byte(s)
Wed Aug 31 21:45:02 2005 UTC (18 years, 9 months ago) by niro
File size: 2019 byte(s)
livecds will be ejected at system reboot / shutdown (needs eject >= 2.1.0-r1)
1 | #!/bin/bash |
2 | # $Header: /home/cvsd/magellan-cvs/magellan-src/magellan-initscripts/etc/rc.d/init.d/mountfslivecd,v 1.5 2005-08-31 21:45:02 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 | |
88 | [ -e /.bootdev ] && [ -x /usr/bin/eject ] && \ |
89 | eject -m /mnt/cdrom &> /dev/null |
90 | |
91 | evaluate_retval |
92 | |
93 | update_svcstatus $1 |
94 | splash svc_stopped "$(basename $0)" 0 |
95 | ;; |
96 | |
97 | *) |
98 | echo "Usage: $0 {start|stop}" |
99 | exit 1 |
100 | ;; |
101 | esac |
Properties
Name | Value |
---|---|
svn:executable | * |