| … | |
… | |
| 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 | # |
| 647 | get_mount_fstab() { |
647 | get_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 |