summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-04-15 15:11:28 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-04-15 15:11:28 +0000
commit1e13d091b1fbf019950493b6077aeba2e300ad80 (patch)
treedaa4c400ab320272eaabba124638abe4f94dc66b /urpm
parent46a81b0350f90f7dbafa78b16cb84f9358c8300f (diff)
downloadurpmi-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
Diffstat (limited to 'urpm')
-rw-r--r--urpm/sys.pm4
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;