From e613566694633ec89870f0284588f5f8f69c5991 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Mon, 3 May 2004 07:29:32 +0000 Subject: Skip comments in /etc/fstab --- urpm.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'urpm.pm') diff --git a/urpm.pm b/urpm.pm index afb8229e..05c406d9 100644 --- a/urpm.pm +++ b/urpm.pm @@ -1781,6 +1781,7 @@ sub is_using_supermount { #- read /etc/fstab and check for existing mount point. open F, "/etc/fstab"; while () { + next if /^\s*#/; my ($device, $mntpoint, $fstype, $options) = m|^\s*(\S+)\s+(/\S+)\s+(\S+)\s+(\S+)| or next; $mntpoint =~ s,/+,/,g; $mntpoint =~ s,/$,,; if ($fstype eq 'supermount') { @@ -1801,6 +1802,7 @@ sub find_mntpoints { #- read /etc/fstab and check for existing mount point. open F, "/etc/fstab"; while () { + next if /^\s*#/; my ($device, $mntpoint, $fstype, $options) = m|^\s*(\S+)\s+(/\S+)\s+(\S+)\s+(\S+)| or next; $mntpoint =~ s,/+,/,g; $mntpoint =~ s,/$,,; $fstab{$mntpoint} = 0; -- cgit v1.2.1