/[baselayout]/branches/rc-scripts-1_6/sbin/functions.sh
Gentoo

Diff of /branches/rc-scripts-1_6/sbin/functions.sh

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

Revision 775 Revision 776
643# EXAMPLE: cmd=$( get_mount_fstab /proc ) 643# EXAMPLE: cmd=$( get_mount_fstab /proc )
644# cmd=${cmd:--t proc none /proc} 644# cmd=${cmd:--t proc none /proc}
645# mount -n ${cmd} 645# mount -n ${cmd}
646# 646#
647get_mount_fstab() { 647get_mount_fstab() {
648 awk '$1 ~ "^#" { next } $2 == "'$*'" { print "-t "$3,"-o "$4,$1,$2 }' /etc/fstab 648 awk '$1 ~ "^#" { next }
649 $2 == "'$*'" { if (found++ == 0) { print "-t "$3,"-o "$4,$1,$2 } }
650 END { if (found > 1) { print "More than one entry for '$*' found in /etc/fstab!" > "/dev/stderr" } }
651 ' /etc/fstab
649} 652}
650 653
651# bool is_older_than(reference, files/dirs to check) 654# bool is_older_than(reference, files/dirs to check)
652# 655#
653# return 0 if any of the files/dirs are newer than 656# return 0 if any of the files/dirs are newer than

Legend:
Removed from v.775  
changed lines
  Added in v.776

  ViewVC Help
Powered by ViewVC 1.1.20