diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-01-10 09:03:20 +0000 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-01-12 08:44:42 +0000 |
commit | ff30da3ebb107421372e2a1a6d37f7c189667f2b (patch) | |
tree | 7dcb10f555e74768f55029d644d16e636abb5420 /lib/MGA/DrakISO/BuildRoot.pm | |
parent | 98ac027245772b49c24b1bbe35b0f33e6551c3e8 (diff) | |
download | drakiso-ff30da3ebb107421372e2a1a6d37f7c189667f2b.tar drakiso-ff30da3ebb107421372e2a1a6d37f7c189667f2b.tar.gz drakiso-ff30da3ebb107421372e2a1a6d37f7c189667f2b.tar.bz2 drakiso-ff30da3ebb107421372e2a1a6d37f7c189667f2b.tar.xz drakiso-ff30da3ebb107421372e2a1a6d37f7c189667f2b.zip |
Simplify run_() helper function and minimise direct calls to system().
Diffstat (limited to 'lib/MGA/DrakISO/BuildRoot.pm')
-rw-r--r-- | lib/MGA/DrakISO/BuildRoot.pm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/MGA/DrakISO/BuildRoot.pm b/lib/MGA/DrakISO/BuildRoot.pm index 187e8a2..a0cc6a2 100644 --- a/lib/MGA/DrakISO/BuildRoot.pm +++ b/lib/MGA/DrakISO/BuildRoot.pm @@ -78,25 +78,25 @@ sub install_live_system { my $error_message; try { # Mount the directory where we want to install the Live system. - mount($chroot . '/mnt', $live_root, '-o bind'); + mount($chroot . '/mnt', $live_root, '--bind'); # Mount the standard system pseudo-filesystems, so that the installer # has a proper environment to run in. mount_system_fs($chroot); - mount($chroot . '/sys/kernel/debug', 'none', '-t debugfs'); + mount($chroot . '/sys/kernel/debug', 'none', '-t', 'debugfs'); # Mount the stage2 installer filesystem. if ($remote_method) { my $local_mdkinst = $chroot . '/tmp/mdkinst.sqfs'; - system("curl --silent -o $local_mdkinst $arch_repository/install/stage2/mdkinst.sqfs") + run_('curl', '--silent', '-o', $local_mdkinst, $arch_repository . '/install/stage2/mdkinst.sqfs') or die "ERROR: failed to download mdkinst.sqfs from remote repository\n"; - mount($chroot_stage2, $local_mdkinst, '-t squashfs -o loop,ro'); + mount($chroot_stage2, $local_mdkinst, '-t', 'squashfs', '-o', 'loop,ro'); } elsif (-d $arch_repository . '/install/stage2/live') { - mount($chroot_stage2, $arch_repository . '/install/stage2/live', '-o bind,ro'); + mount($chroot_stage2, $arch_repository . '/install/stage2/live', '--bind', '-o', 'ro'); } elsif (-f $arch_repository . '/install/stage2/mdkinst.sqfs') { - mount($chroot_stage2, $arch_repository . '/install/stage2/mdkinst.sqfs', '-t squashfs -o loop,ro'); + mount($chroot_stage2, $arch_repository . '/install/stage2/mdkinst.sqfs', '-t', 'squashfs', '-o', 'loop,ro'); } else { die "ERROR: failed to find installer stage2\n"; @@ -104,7 +104,7 @@ sub install_live_system { # The stage2 installer expects to find the full repository in this # location... - mount($chroot . '/tmp/media', $base_repository, '-o bind,ro') if !$remote_method; + mount($chroot . '/tmp/media', $base_repository, '--bind', '-o', 'ro') if !$remote_method; # and the arch-specific repository in this location. symlinkf('media/' . $arch, $chroot . '/tmp/image'); # Because the installer uses the above symlink, relative paths in |