Magellan Linux

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

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

revision 146 by niro, Tue Mar 15 19:07:56 2005 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.3 2005-03-15 19:07:56 niro Exp $  # $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    
# Line 389  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.146  
changed lines
  Added in v.147