diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-01-09 23:17:35 +0000 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-01-09 23:17:35 +0000 |
commit | 63555aa270059488b013e6c802cca64a8d6eebdc (patch) | |
tree | 75c481453e459dc2aea279a86eb89ceedfd0ecf1 /lib/MGA/DrakISO/Loopback.pm | |
parent | 71146812d733fdc46abe1d77b7d68f9859cdc124 (diff) | |
download | drakiso-63555aa270059488b013e6c802cca64a8d6eebdc.tar drakiso-63555aa270059488b013e6c802cca64a8d6eebdc.tar.gz drakiso-63555aa270059488b013e6c802cca64a8d6eebdc.tar.bz2 drakiso-63555aa270059488b013e6c802cca64a8d6eebdc.tar.xz drakiso-63555aa270059488b013e6c802cca64a8d6eebdc.zip |
draklive: allow installer GUI to be used and run as normal user.
Read all configuration from the main config file and automatically
generate the auto_inst.cfg.pl file. Run the installer GUI in a nested
X server if any items are not specified in the config file. Use sudo
to run any steps that need root privileges, to avoid running the X
server as root.
Diffstat (limited to 'lib/MGA/DrakISO/Loopback.pm')
-rw-r--r-- | lib/MGA/DrakISO/Loopback.pm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/MGA/DrakISO/Loopback.pm b/lib/MGA/DrakISO/Loopback.pm index e06d2a4..219b9b8 100644 --- a/lib/MGA/DrakISO/Loopback.pm +++ b/lib/MGA/DrakISO/Loopback.pm @@ -55,14 +55,13 @@ our %loop_types; my $root = $dir->{root} || $build->get_system_root; my $src = $root . $dir->{build_from}; my $total = directory_usage($src); - print "have to process " . int($total/1000000) . " MB\n"; + print "Have to process " . int($total/1000000) . " MB\n" if $::verbose; my $exclude_file = tmpnam(); output_p($exclude_file, map { $root . "$_\n" } grep { -e $root . $_ } @{$dir->{exclude} || []}); my $sort = $build->{settings}{config_root} . '/' . $dir->{sort}; my $squashfs4_comp = best_squashfs4_compression($build); - run_($squashfs4_comp ? 'mksquashfs' : 'mksquashfs3', - # unless/until we get a quiet option - if_($::verbose < 2, '>', '/dev/null'), + run_as_root(join(' ', + $squashfs4_comp ? 'mksquashfs' : 'mksquashfs3', $src, $dest, $squashfs4_comp ? ('-comp', $squashfs4_comp) : '-lzma', '-noappend', '-b', '1048576', @@ -71,7 +70,9 @@ our %loop_types; if_(-f $sort, '-sort', $sort), if_($::verbose > 2, '-info', '-progress'), if_($::verbose < 2, '-no-progress'), - ) or die "unable to run mksquashfs\n"; + # due to lack of a -quiet option + if_($::verbose < 2, '> /dev/null'), + )) or die "ERROR: unable to run mksquashfs\n"; unlink $exclude_file; }, mount => sub { |