summaryrefslogtreecommitdiffstats
path: root/lib/MGA
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MGA')
-rw-r--r--lib/MGA/DrakISO/Utils.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/MGA/DrakISO/Utils.pm b/lib/MGA/DrakISO/Utils.pm
index c283d0d..43dc357 100644
--- a/lib/MGA/DrakISO/Utils.pm
+++ b/lib/MGA/DrakISO/Utils.pm
@@ -140,6 +140,7 @@ sub mount {
sub mount_system_fs {
my ($root) = @_;
+ $root or die;
mount($root . '/dev', '/dev', '--bind', '-o', 'ro');
mount($root . '/proc', 'none', '-t', 'proc');
mount($root . '/sys', 'none', '-t', 'sysfs');
@@ -148,6 +149,7 @@ sub mount_system_fs {
sub umount_all_in_root {
my ($root) = @_;
+ $root or die;
$root = Cwd::abs_path($root);
my @mounts = grep { $_ =~ $root } split("\n", cat_('/proc/mounts'));
foreach (reverse(@mounts)) {