Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3 by niro, Mon Dec 13 22:52:07 2004 UTC revision 149 by niro, Sun Jul 3 21:32:18 2005 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/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  #%rlevels: 7:s 0:k 6:k
5  #%start: 40  #%start: 40
# Line 16  case "$1" in Line 17  case "$1" in
17   start)   start)
18   echo -e ${COLOREDSTAR}"Recording existing mounts in /etc/mtab ..."   echo -e ${COLOREDSTAR}"Recording existing mounts in /etc/mtab ..."
19   > /etc/mtab   > /etc/mtab
20    
21   #fake mount rootfs (taken from /.bootdev)   # fake mounts rootfs (taken from /.bootdev)
22   if [ -e /.bootdev ]   if [ -e /.bootdev ]
23   then   then
24   source /.bootdev   source /.bootdev
25   mount -f ${BOOTDEV} /mnt/cdrom -t ${FSTYPE} -o ro   mount -f ${BOOTDEV} /mnt/cdrom -t ${FSTYPE} -o ro
26   #we don't delete this for the alx settings import   # we don't delete this for the alx settings import
27   #wanna check if usbstorage or not   # wanna check if usbstorage or not
28   #rm /.bootdev   # rm /.bootdev
29   fi   fi
30    
31   #fake mount cloop   # fake mounts cloop, loop or sqsh
32   mount -f /mnt/cdrom/livecdrootfs.cloop /mnt/cloop -t ext2 -o ro   if [ -f /mnt/cdrom/livecdrootfs.loop ]
33     then
34   #fake mount dev   mount -f /mnt/cdrom/livecdrootfs.loop /mnt/cloop -t ext2 -o ro
35   mount -f devfs /dev -t devfs -o rw  
36     elif [ -f /mnt/cdrom/livecdrootfs.cloop ]
37   #fake mount tmpfs   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   mount -f tmpfs / -t tmpfs -o rw
71    
72   #fake mount proc   # fake mounts proc
73   mount -f proc /proc -t proc -o rw   mount -f proc /proc -t proc -o rw
74    
75   evaluate_retval   evaluate_retval

Legend:
Removed from v.3  
changed lines
  Added in v.149