Also disable initctl in the chroot, not only start-stop-daemon
Closes LP#997063. Thanks xstasi on Lauchnpad for the patch
This commit is contained in:
2
debian/changelog
vendored
2
debian/changelog
vendored
@@ -23,6 +23,8 @@ xen-tools (4.3~dev-1) UNRELEASED; urgency=low
|
||||
- No more expect at least one option to mkfs.* calls. Fixes btrfs
|
||||
creation. (Closes: #609982)
|
||||
- Fixes call to non-existent function logPrint (Closes: #673335)
|
||||
- Also disable initctl in the chroot, not only start-stop-daemon
|
||||
(LP: #997063; Thanks xstasi!)
|
||||
* Add dependency on openssh-client for ssh-keygen (Closes: #649108)
|
||||
* Use dh_auto_test for build time tests and add according
|
||||
build-dependencies on devscripts and libfile-slurp-perl.
|
||||
|
||||
@@ -121,14 +121,16 @@ disableStartStopDaemon ()
|
||||
{
|
||||
local prefix="$1"
|
||||
assert "$LINENO" "${prefix}"
|
||||
local daemonfile="${prefix}/sbin/start-stop-daemon"
|
||||
for starter in start-stop-daemon initctl; do
|
||||
local daemonfile="${prefix}/sbin/${starter}"
|
||||
|
||||
mv "${daemonfile}" "${daemonfile}.REAL"
|
||||
echo '#!/bin/sh' > "${daemonfile}"
|
||||
echo "echo \"Warning: Fake start-stop-daemon called, doing nothing\"" >> "${daemonfile}"
|
||||
mv "${daemonfile}" "${daemonfile}.REAL"
|
||||
echo '#!/bin/sh' > "${daemonfile}"
|
||||
echo "echo \"Warning: Fake ${starter} called, doing nothing\"" >> "${daemonfile}"
|
||||
|
||||
chmod 755 "${daemonfile}"
|
||||
logMessage "start-stop-daemon disabled / made a stub."
|
||||
chmod 755 "${daemonfile}"
|
||||
logMessage "${starter} disabled / made a stub."
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
@@ -140,16 +142,17 @@ enableStartStopDaemon ()
|
||||
{
|
||||
local prefix=$1
|
||||
assert "$LINENO" "${prefix}"
|
||||
local daemonfile="${prefix}/sbin/start-stop-daemon"
|
||||
|
||||
#
|
||||
# If the disabled file is present then enable it.
|
||||
#
|
||||
if [ -e "${daemonfile}.REAL" ]; then
|
||||
mv "${daemonfile}.REAL" "${daemonfile}"
|
||||
logMessage "start-stop-daemon restored to working order."
|
||||
fi
|
||||
for starter in start-stop-daemon initctl; do
|
||||
local daemonfile="${prefix}/sbin/${starter}"
|
||||
|
||||
#
|
||||
# If the disabled file is present then enable it.
|
||||
#
|
||||
if [ -e "${daemonfile}.REAL" ]; then
|
||||
mv "${daemonfile}.REAL" "${daemonfile}"
|
||||
logMessage "${starter} restored to working order."
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user