Magellan Linux

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

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

revision 71 by niro, Tue Mar 15 19:07:56 2005 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/mountfs,v 1.3 2005-03-15 19:07:56 niro Exp $  # $Header: /home/cvsd/magellan-cvs/magellan-src/magellan-initscripts/etc/rc.d/init.d/mountfs,v 1.4 2005-07-03 21:32:06 niro Exp $
3    
4  #%rlevels: 7:s 0:k 6:k  #%rlevels: 7:s 0:k 6:k
5  #%start: 40  #%start: 40
# Line 13  Line 13 
13  source /etc/sysconfig/rc  source /etc/sysconfig/rc
14  source $rc_functions  source $rc_functions
15    
 #$1= filesys  
 get_mounted(){  
  local filesys  
  filesys=$1  
   
  cat /proc/mounts | grep ${filesys} | cut -d ' ' -f3  
 }  
   
16  case "$1" in  case "$1" in
17   start)   start)
18   echo -e ${COLOREDSTAR}"Remounting root file system in read-write mode ..."   echo -e ${COLOREDSTAR}"Remounting root file system in read-write mode ..."
# Line 31  case "$1" in Line 23  case "$1" in
23   > /etc/mtab   > /etc/mtab
24   mount -f / && mount -f /proc   mount -f / && mount -f /proc
25    
26   #records devfs if mounted   # records devfs as mounted
27   if [ "$(get_mounted devfs)" == devfs ]   if is_fs_mounted devfs
28   then   then
29   mount -f -t devfs none /dev   mount -f -t devfs devfs /dev
30   fi   fi
31    
32   #records devpts if mounted   # records devpts as mounted
33   if [ "$(get_mounted devpts)" == devpts ]   if is_fs_mounted devpts
34   then   then
35   mount -f -t devpts none /dev/pts   mount -f -t devpts devpts /dev/pts
36   fi   fi
37    
38   #records sysfs if mounted   # records sysfs as mounted
39   if [ "$(get_mounted sysfs)" == sysfs ]   if is_fs_mounted sysfs
40   then   then
41   mount -f -t sysfs none /sys   mount -f -t sysfs sysfs /sys
42   fi   fi
43    
44   #records udev's ramfs if mounted   # records udev as mounted
45   if [ "$(get_mounted ramfs)" == ramfs ]   if is_fs_mounted udev
46   then   then
47   mount -f -t ramfs none /dev   mount -f -t ramfs udev /dev
48   fi   fi
49    
50   evaluate_retval   evaluate_retval

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