From b5d58a231249d719a3bf9723ab9445b92bfdb1a5 Mon Sep 17 00:00:00 2001 From: freesource Date: Sat, 8 Dec 2001 03:15:43 +0000 Subject: [PATCH] This fixes some messiness for the fstab test, and gets rid of an unecessary test. --- yard_chrooted_tests | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/yard_chrooted_tests b/yard_chrooted_tests index d54f850..6cf8afe 100755 --- a/yard_chrooted_tests +++ b/yard_chrooted_tests @@ -102,7 +102,7 @@ sub check_fstab { chomp; next if /^\#/ or /^\s*$/; - my($dev, $mp, $type, $opts) = split; + my($dev, $mp, $type, $opts) = split m,[\s\t]+,; next if $mp eq 'none' or $type eq 'swap'; next if $dev eq 'none'; @@ -123,24 +123,31 @@ sub check_fstab { warning("\t($.): You probably should include \"noauto\" option\n", "\tin the fstab entry of a hard disk. When the rescue floppy\n", "\tboots, the \"mount -a\" will try to mount $dev\n"); - - } elsif ($dev eq $::floppy and $type ne 'ext2' and $type ne 'auto') { - warning("\t($.): You've declared your floppy drive $::floppy", - " to hold\n", - "\ta $type filesystem, which is not ext2. The rescue floppy\n", - "\tis ext2, which may confuse 'mount -a' during boot.\n"); - - } elsif ($type eq 'proc') { + } + elsif ($type eq 'proc') { $proc_seen = 1; } + } + close(FSTAB); warning("\tNo /proc filesystem defined.\n") unless $proc_seen; print "Done with $FSTAB\n"; } + # This is unecessary, besides lot of different types of filesystem + # types may be used. +## elsif ($dev eq $::floppy and $type ne 'ext2' and $type ne 'auto') { +## warning("\t($.): You've declared your floppy drive $::floppy", +## " to hold\n", +## "\ta $type filesystem, which is not ext2. The rescue floppy\n", +## "\tis ext2, which may confuse 'mount -a' during boot.\n"); +## } + + + sub check_inittab { my($INITTAB) = "/etc/inittab"; print "\nChecking $INITTAB\n";