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 273 by niro, Sun Jul 3 21:30:58 2005 UTC revision 274 by niro, Fri Oct 21 15:21:41 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 $  # $Header: /home/cvsd/magellan-cvs/magellan-src/magellan-initscripts/etc/rc.d/init.d/functions,v 1.5 2005-10-21 15:21:41 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 425  kernel_supports_fs() { Line 425  kernel_supports_fs() {
425    
426   return 0   return 0
427  }  }
428    
429    # bool is_older_than(reference, files/dirs to check)
430    #
431    #   return 0 if any of the files/dirs are newer than
432    #   the reference file
433    #
434    #   EXAMPLE: if is_older_than a.out *.o ; then ...
435    is_older_than() {
436     local x=
437     local ref="$1"
438     shift
439    
440     for x in "$@"
441     do
442     [[ ${x} -nt ${ref} ]] && return 0
443    
444     if [[ -d ${x} ]]
445     then
446     is_older_than "${ref}" "${x}"/* && return 0
447     fi
448     done
449    
450     return 1
451    }

Legend:
Removed from v.273  
changed lines
  Added in v.274