diff --git a/em_multistrap b/em_multistrap index 2443260..6794afc 100755 --- a/em_multistrap +++ b/em_multistrap @@ -130,6 +130,14 @@ foreach my $file (@touch) { utime(time, time, "${dir}etc/shells") or (open(F, ">${dir}etc/shells") && close F ); +if (not -d "${dir}etc/network") { + mkdir "${dir}etc/network"; +} + +if (not -d "${dir}dev") { + mkdir "${dir}dev"; +} + unlink ("${dir}etc/apt/sources.list.d/multistrap.sources.list") if (-f "${dir}etc/apt/sources.list.d/multistrap.sources.list"); unlink ("${dir}etc/apt/sources.list") @@ -166,8 +174,9 @@ END } } -foreach $keyring (sort values %keyrings) +foreach $keyring (values %keyrings) { + next if not defined ($keyring); my $e=`printenv`; my $str = ($e =~ /\nUSER=root\n/) ? "" : "sudo "; $str = (-f "/usr/bin/sudo") ? "$str" : ""; @@ -191,7 +200,16 @@ $config_str .= " -o Dir::Cache=${dir}${cachedir}"; system ("apt-get $config_str update"); $str = join (' ', values %packages) . " "; chomp($str); -$str .= join (' ', values %keyrings) . " "; +my $k; +foreach my $pkg (values %keyrings) +{ + next if (not defined $pkg); + my $status = `dpkg -s $pkg`; + next if $status =~ /Status: install ok installed/; + $k .= "$pkg "; +} +$k = "" if (not defined $k); +$str .= "$k "; chomp($str); my $required = &get_required_debs; $str .= join (' ', @$required); @@ -438,6 +456,8 @@ directory=/opt/multistrap/ # same as --tidy-up option if set to true cleanup=true # same as --no-auth option if set to true +# keyring packages listed in each debootstrap will +# still be installed. noauth=false # extract all downloaded archives (default is true) unpack=true @@ -509,6 +529,8 @@ Example configuration: # same as --tidy-up option if set to true cleanup=true # same as --no-auth option if set to true + # keyring packages listed in each debootstrap will + # still be installed. noauth=false # extract all downloaded archives (default is true) unpack=true