1
0
mirror of synced 2026-04-17 00:00:12 +00:00

Fix disableStartStopDaemon() if /sbin/initctl is not present

This commit is contained in:
Patryk Ściborek
2013-10-28 20:48:10 +01:00
committed by Axel Beckert
parent ca734e511f
commit 96679edad9

View File

@@ -261,12 +261,14 @@ disableStartStopDaemon ()
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 ${starter} called, doing nothing\"" >> "${daemonfile}"
if [ -e "${daemonfile}" ]; then
mv "${daemonfile}" "${daemonfile}.REAL"
echo '#!/bin/sh' > "${daemonfile}"
echo "echo \"Warning: Fake ${starter} called, doing nothing\"" >> "${daemonfile}"
chmod 755 "${daemonfile}"
logMessage "${starter} disabled / made a stub."
chmod 755 "${daemonfile}"
logMessage "${starter} disabled / made a stub."
fi
done
}