Rework the fix for #734460, kill NetworkManager in the postinst script instead of the preinst one to minimize downtime on big upgrades
Laurent Bigonville
10 years ago
|
0 |
network-manager (0.9.8.8-6) UNRELEASED; urgency=medium
|
|
1 |
|
|
2 |
* Rework the fix for #734460, kill NetworkManager in the postinst script
|
|
3 |
instead of the preinst one to minimize downtime on big upgrades
|
|
4 |
|
|
5 |
-- Laurent Bigonville <bigon@debian.org> Fri, 04 Apr 2014 01:42:47 +0200
|
|
6 |
|
0 | 7 |
network-manager (0.9.8.8-5) unstable; urgency=medium
|
1 | 8 |
|
2 | 9 |
* Bump debhelper compatibility level to 9.
|
19 | 19 |
|
20 | 20 |
case "$1" in
|
21 | 21 |
configure)
|
|
22 |
# When upgrading from a version that was using an Alias= instead of
|
|
23 |
# symlink to mask the LSB initscript, if we are running systemd and
|
|
24 |
# NetworkManager has been started by the LSB script, kill the process
|
|
25 |
# before we are restarting it. (See: #734460)
|
|
26 |
if dpkg --compare-versions "$2" lt-nl "0.9.8.8-2~"; then
|
|
27 |
if [ -d /run/systemd/system ] && \
|
|
28 |
[ -f /var/run/NetworkManager/NetworkManager.pid ]; then
|
|
29 |
start-stop-daemon --stop --retry 5 --quiet --exec /usr/sbin/NetworkManager \
|
|
30 |
--pidfile /var/run/NetworkManager/NetworkManager.pid || true
|
|
31 |
fi
|
|
32 |
fi
|
22 | 33 |
|
23 | 34 |
# Create netdev group that is used in the D-Bus policy file
|
24 | 35 |
addgroup --quiet --system netdev
|
18 | 18 |
|
19 | 19 |
case "$1" in
|
20 | 20 |
install|upgrade)
|
21 | |
# When upgrading from a version that was using an Alias= instead of
|
22 | |
# symlink to mask the LSB initscript, stop NetworkManager before
|
23 | |
# upgrading if we are running systemd and the NetworkManager.service is
|
24 | |
# not enabled. This will ensure that NM can properly be stopped and
|
25 | |
# then started again after the upgrade (See: #734460)
|
26 | |
if dpkg --compare-versions "$2" lt-nl "0.9.8.8-2~"; then
|
27 | |
if [ -d /run/systemd/system ] && \
|
28 | |
! systemctl is-enabled NetworkManager.service > /dev/null 2>&1; then
|
29 | |
if [ -x "/etc/init.d/network-manager" ]; then
|
30 | |
invoke-rc.d network-manager stop || exit $?
|
31 | |
fi
|
32 | |
fi
|
33 | |
fi
|
34 | 21 |
if dpkg --compare-versions "$2" lt "0.9.8.8-4"; then
|
35 | 22 |
if [ -L /etc/systemd/system/network-manager.service ]; then
|
36 | 23 |
rm -f /etc/systemd/system/network-manager.service
|