diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-04-15 15:11:28 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-04-15 15:11:28 +0000 |
commit | 1e13d091b1fbf019950493b6077aeba2e300ad80 (patch) | |
tree | daa4c400ab320272eaabba124638abe4f94dc66b | |
parent | 46a81b0350f90f7dbafa78b16cb84f9358c8300f (diff) | |
download | urpmi-1e13d091b1fbf019950493b6077aeba2e300ad80.tar urpmi-1e13d091b1fbf019950493b6077aeba2e300ad80.tar.gz urpmi-1e13d091b1fbf019950493b6077aeba2e300ad80.tar.bz2 urpmi-1e13d091b1fbf019950493b6077aeba2e300ad80.tar.xz urpmi-1e13d091b1fbf019950493b6077aeba2e300ad80.zip |
Don't die if fstab or mtab isn't present
-rw-r--r-- | urpm/sys.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/urpm/sys.pm b/urpm/sys.pm index 11c7604f..02ba628b 100644 --- a/urpm/sys.pm +++ b/urpm/sys.pm @@ -9,7 +9,7 @@ sub find_mntpoints { my (%fstab, @mntpoints); local ($_); #- read /etc/fstab and check for existing mount point. - open my $f, "/etc/fstab" or die "Can't read fstab: $!\n"; + open my $f, "/etc/fstab" or return (); while (<$f>) { next if /^\s*#/; my ($device, $mntpoint, $fstype, $options) = m!^\s*(\S+)\s+(/\S+)\s+(\S+)\s+(\S+)! @@ -30,7 +30,7 @@ sub find_mntpoints { } } close $f; - open $f, "/etc/mtab" or die "Can't read mtab: $!\n"; + open $f, "/etc/mtab" or return (); while (<$f>) { my ($device, $mntpoint, $fstype, $options) = m!^\s*(\S+)\s+(/\S+)\s+(\S+)\s+(\S+)! or next; |