[Vagrant Cascadian]
> lessdisks-terminal is another package which could make use of this
> feature.
If this feature is implemented in the start-stop-daemon itself, we
would be able to use it in debian-installer, replacing code
implementing our own start-stop-daemon with the simple setting of an
evironment variable.
At the moment we have code like this in apt-install (from
debian-installer-utils):
# Create a policy-rc.d to stop maintainer scripts using invoke-rc.d from
# running init scripts. In case of maintainer scripts that don't use
# invoke-rc.d, add a dummy start-stop-daemon.
disable_daemons () {
cat > /target/usr/sbin/policy-rc.d <<EOF
#!/bin/sh
exit 101
EOF
chmod a+rx /target/usr/sbin/policy-rc.d
if [ -e /target/sbin/start-stop-daemon ]; then
mv /target/sbin/start-stop-daemon
/target/sbin/start-stop-daemon.REAL
fi
cat > /target/sbin/start-stop-daemon <<EOF
#!/bin/sh
echo 1>&2
echo 'Warning: Fake start-stop-daemon called, doing nothing.' 1>&2
exit 0
EOF
chmod a+rx /target/sbin/start-stop-daemon
}
enable_daemons () {
rm -f /target/usr/sbin/policy-rc.d
rm /target/sbin/start-stop-daemon
mv /target/sbin/start-stop-daemon.REAL /target/sbin/start-stop-daemon
}
I also had to do similar things when I made a script to test upgrades.
In that script I used divert.
make_dummy_start_stop_daemon() {
cat > $target/sbin/start-stop-daemon.dummy <<EOF
#!/bin/sh
echo 1>&2
echo 'Warning: Fake start-stop-daemon called, doing nothing.' 1>&2
exit 0
EOF
chmod a+rx $target/sbin/start-stop-daemon.dummy
chroot $target dpkg-divert --add --local --rename /sbin/start-stop-daemon
ln -s start-stop-daemon.dummy $target/sbin/start-stop-daemon
}
So there are workarounds, but it would be better if the functionallity
was in the normal start-stop-daemon.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]