|
|
@ -698,6 +698,10 @@ sub setup {
|
|
|
|
} elsif ($type == 1) { # hardlink
|
|
|
|
} elsif ($type == 1) { # hardlink
|
|
|
|
die "type 1 not implemented";
|
|
|
|
die "type 1 not implemented";
|
|
|
|
} elsif ($type == 2) { # symlink
|
|
|
|
} 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";
|
|
|
|
symlink $linkname, "$options->{root}/$fname" or die "cannot create symlink $fname";
|
|
|
|
next; # chmod cannot work on symlinks
|
|
|
|
next; # chmod cannot work on symlinks
|
|
|
|
} elsif ($type == 3) { # character special
|
|
|
|
} elsif ($type == 3) { # character special
|
|
|
@ -1110,6 +1114,10 @@ sub setup {
|
|
|
|
die "type 1 not implemented";
|
|
|
|
die "type 1 not implemented";
|
|
|
|
} elsif ($type == 2) { # symlink
|
|
|
|
} elsif ($type == 2) { # symlink
|
|
|
|
if (!$options->{havemknod}) {
|
|
|
|
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";
|
|
|
|
symlink $linkname, "$options->{root}/$fname" or die "cannot create symlink $fname";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} elsif ($type == 3 or $type == 4) { # character/block special
|
|
|
|
} elsif ($type == 3 or $type == 4) { # character/block special
|
|
|
@ -1179,6 +1187,10 @@ sub setup {
|
|
|
|
die "type 1 not implemented";
|
|
|
|
die "type 1 not implemented";
|
|
|
|
} elsif ($type == 2) { # symlink
|
|
|
|
} elsif ($type == 2) { # symlink
|
|
|
|
if (!$options->{havemknod}) {
|
|
|
|
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: $!";
|
|
|
|
unlink "$options->{root}/$fname" or die "cannot unlink $fname: $!";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} elsif ($type == 3 or $type == 4) { # character/block special
|
|
|
|
} elsif ($type == 3 or $type == 4) { # character/block special
|
|
|
|