Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


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

1 niro 2 #!/bin/bash
2 niro 149 # $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 niro 2
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 niro 71
21 niro 149 # fake mounts rootfs (taken from /.bootdev)
22 niro 2 if [ -e /.bootdev ]
23     then
24     source /.bootdev
25     mount -f ${BOOTDEV} /mnt/cdrom -t ${FSTYPE} -o ro
26 niro 149 # we don't delete this for the alx settings import
27     # wanna check if usbstorage or not
28     # rm /.bootdev
29 niro 2 fi
30 niro 71
31 niro 149 # fake mounts cloop, loop or sqsh
32 niro 9 if [ -f /mnt/cdrom/livecdrootfs.loop ]
33     then
34     mount -f /mnt/cdrom/livecdrootfs.loop /mnt/cloop -t ext2 -o ro
35 niro 2
36 niro 9 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 niro 71 fi
44 niro 9
45 niro 149 # records devfs as mounted
46     if is_fs_mounted devfs
47 niro 9 then
48 niro 149 mount -f -t devfs devfs /dev
49 niro 9 fi
50    
51 niro 149 # records devpts as mounted
52     if is_fs_mounted devpts
53 niro 9 then
54 niro 149 mount -f -t devpts devpts /dev/pts
55 niro 9 fi
56    
57 niro 149 # records sysfs as mounted
58     if is_fs_mounted sysfs
59 niro 9 then
60 niro 149 mount -f -t sysfs sysfs /sys
61 niro 9 fi
62    
63 niro 149 # records udev as mounted
64     if is_fs_mounted udev
65 niro 9 then
66 niro 149 mount -f -t ramfs udev /dev
67 niro 9 fi
68 niro 71
69 niro 149 # fake mounts tmpfs
70 niro 2 mount -f tmpfs / -t tmpfs -o rw
71    
72 niro 149 # fake mounts proc
73 niro 2 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 *