[SCM] live-debconfig branch, debian-next, updated. debian/4.0_a3-1-20-g052eb48
Daniel Baumann
daniel at debian.org
Fri Aug 17 11:29:33 UTC 2012
The following commit has been merged in the debian-next branch:
commit 052eb48acdcc8c4f1d8d9dc16de9666a2f7a154c
Author: Daniel Baumann <daniel at debian.org>
Date: Fri Aug 17 13:29:30 2012 +0200
Reworking the already-disabled case for services in sysvinit script.
diff --git a/scripts/debconfig/0030-sysvinit b/scripts/debconfig/0030-sysvinit
index 917d433..06ed19e 100755
--- a/scripts/debconfig/0030-sysvinit
+++ b/scripts/debconfig/0030-sysvinit
@@ -147,6 +147,8 @@ case "${_LXC_ENABLE}" in
continue
fi
+ _ALREADY_DISABLED="false"
+
# service is already disabled
for _RUNLEVEL in /etc/rc*.d
do
@@ -160,27 +162,30 @@ case "${_LXC_ENABLE}" in
fi
# service is indeed already disabled
- continue
+ _ALREADY_DISABLED="true"
done
- if ls /etc/rc*.d/K*${_SERVICE} > /dev/null 2>&1 && \
- ! ls /etc/rc*.d/S*${_SERVICE} > /dev/null 2>&1
+ if [ "${_ALREADY_DISBALED}" = "false" ]
then
- # service has only stop links
- # therefore, using 'update-rc.d disable' does not work,
- # and using 'update-rc.d remove' is not upgrade safe
- # (on upgrades, the stop links would be re-added).
- for _SYMLINK in /etc/rc*.d/K*${_SERVICE}
- do
- rm -f ${_SYMLINK}
- ln -s /bin/live-sysvinit-empty ${_SYMLINK}
- done
- fi
+ if ls /etc/rc*.d/K*${_SERVICE} > /dev/null 2>&1 && \
+ ! ls /etc/rc*.d/S*${_SERVICE} > /dev/null 2>&1
+ then
+ # service has only stop links
+ # therefore, using 'update-rc.d disable' does not work,
+ # and using 'update-rc.d remove' is not upgrade safe
+ # (on upgrades, the stop links would be re-added).
+ for _SYMLINK in /etc/rc*.d/K*${_SERVICE}
+ do
+ rm -f ${_SYMLINK}
+ ln -s /bin/live-sysvinit-empty ${_SYMLINK}
+ done
+ fi
- # service is a normal service with both start and stop links
- update-rc.d -f ${_SERVICE} disable 2>&1 | \
- grep -v "update-rc.d: using dependency based boot sequencing" | \
- grep -v "update-rc.d: error: cannot find a LSB script for mountroot" || true
+ # service is a normal service with both start and stop links
+ update-rc.d -f ${_SERVICE} disable 2>&1 | \
+ grep -v "update-rc.d: using dependency based boot sequencing" | \
+ grep -v "update-rc.d: error: cannot find a LSB script for mountroot" || true
+ fi
done
;;
--
live-debconfig
More information about the debian-live-changes
mailing list