Magellan Linux

Diff of /trunk/initscripts/sysvinit/rc/functions

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

revision 3 by niro, Mon Dec 13 22:52:07 2004 UTC revision 147 by niro, Sun Jul 3 21:30:58 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/functions,v 1.4 2005-07-03 21:30:58 niro Exp $
3    
4  # Begin $rc_base/init.d/functions - Run Level Control Functions  # Begin $rc_base/init.d/functions - Run Level Control Functions
5    
6  # Based on functions script from LFS-3.1 and earlier.  # Based on functions script from LFS-3.1 and earlier.
# Line 48  svcsize=1024 Line 50  svcsize=1024
50    
51  # dummy function; needed if splashutils are not installed  # dummy function; needed if splashutils are not installed
52  splash() {  splash() {
53          return 0   return 0
54  }  }
55    
56    
# Line 106  update_svcstatus() Line 108  update_svcstatus()
108   then   then
109   #check if statedir exists   #check if statedir exists
110   [ ! -d ${svcdir}/started ] && mkdir ${svcdir}/started   [ ! -d ${svcdir}/started ] && mkdir ${svcdir}/started
111    
112   #get real name of the initscript, not from the symlink   #get real name of the initscript, not from the symlink
113   if [ -L "$0" ]   if [ -L "$0" ]
114   then   then
# Line 387  dolisting() Line 389  dolisting()
389    
390   echo "${mylist}"   echo "${mylist}"
391  }  }
392    
393    # searches /proc/mounts for mounted fstypes (like ext3)
394    is_fstype_mounted() {
395     local filesys
396     local i
397     filesys=$1
398    
399     i="$(cat /proc/mounts | grep ${filesys} | cut -d ' ' -f3)"
400     [[ ${i} != ${filesys} ]] && return 1
401    
402     return 0
403    }
404    
405    # searches /proc/mounts for mounted fs names (like udev, proc)
406    is_fs_mounted() {
407     local filesys
408     local i
409     filesys=$1
410    
411     i="$(cat /proc/mounts | grep ${filesys} | cut -d ' ' -f1)"
412     [[ ${i} != ${filesys} ]] && return 1
413    
414     return 0
415    }
416    
417    # checks if kernel supports fs xy
418    kernel_supports_fs() {
419     local filesys
420     local i
421     filesys=$1
422    
423     i="$(cat /proc/filesystems | grep ${filesys} | cut -d $'\t' -f2)"
424     [[ ${i} != ${filesys} ]] && return 1
425    
426     return 0
427    }

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