forked from josch/mmdebstrap
allow custom daemon startup prevention
don't bother with /sbin/start-stop-daemon and /usr/sbin/policy-rc.d if they're not a regular files (e.g. symlinks) Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
This commit is contained in:
parent
c4a43ea0f9
commit
e4e10b670c
1 changed files with 2 additions and 2 deletions
|
@ -1290,7 +1290,7 @@ sub run_chroot {
|
||||||
}
|
}
|
||||||
|
|
||||||
# the file might not exist if it was removed in a hook
|
# the file might not exist if it was removed in a hook
|
||||||
if (-e "$options->{root}/sbin/start-stop-daemon") {
|
if (-f "$options->{root}/sbin/start-stop-daemon") {
|
||||||
if (-e "$options->{root}/sbin/start-stop-daemon.REAL") {
|
if (-e "$options->{root}/sbin/start-stop-daemon.REAL") {
|
||||||
error "$options->{root}/sbin/start-stop-daemon.REAL already"
|
error "$options->{root}/sbin/start-stop-daemon.REAL already"
|
||||||
. " exists";
|
. " exists";
|
||||||
|
@ -1318,7 +1318,7 @@ sub run_chroot {
|
||||||
"$options->{root}/sbin/start-stop-daemon"
|
"$options->{root}/sbin/start-stop-daemon"
|
||||||
) or error "cannot move start-stop-daemon: $!";
|
) or error "cannot move start-stop-daemon: $!";
|
||||||
}
|
}
|
||||||
if (-e "$options->{root}/usr/sbin/policy-rc.d") {
|
if (-f "$options->{root}/usr/sbin/policy-rc.d") {
|
||||||
unlink "$options->{root}/usr/sbin/policy-rc.d"
|
unlink "$options->{root}/usr/sbin/policy-rc.d"
|
||||||
or error "cannot unlink policy-rc.d: $!";
|
or error "cannot unlink policy-rc.d: $!";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue