diff --git a/mmdebstrap b/mmdebstrap index 96d17df..9a3bb2a 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -698,6 +698,10 @@ sub setup { } elsif ($type == 1) { # hardlink die "type 1 not implemented"; } elsif ($type == 2) { # symlink + if ($options->{mode} eq 'fakechroot' and $linkname =~ /^\/proc/) { + # there is no /proc in fakechroot mode + next; + } symlink $linkname, "$options->{root}/$fname" or die "cannot create symlink $fname"; next; # chmod cannot work on symlinks } elsif ($type == 3) { # character special @@ -1110,6 +1114,10 @@ sub setup { die "type 1 not implemented"; } elsif ($type == 2) { # symlink if (!$options->{havemknod}) { + if ($options->{mode} eq 'fakechroot' and $linkname =~ /^\/proc/) { + # there is no /proc in fakechroot mode + next; + } symlink $linkname, "$options->{root}/$fname" or die "cannot create symlink $fname"; } } elsif ($type == 3 or $type == 4) { # character/block special @@ -1179,6 +1187,10 @@ sub setup { die "type 1 not implemented"; } elsif ($type == 2) { # symlink if (!$options->{havemknod}) { + if ($options->{mode} eq 'fakechroot' and $linkname =~ /^\/proc/) { + # there is no /proc in fakechroot mode + next; + } unlink "$options->{root}/$fname" or die "cannot unlink $fname: $!"; } } elsif ($type == 3 or $type == 4) { # character/block special