From 20d22673eb4f9481bc2ae9fdb786f3d7e467bcbe Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 25 Apr 2018 11:44:00 +0200 Subject: [SSUS] Properly stop and remove atftpd --- satellit_upgrader/updater.template.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/satellit_upgrader/updater.template.sh b/satellit_upgrader/updater.template.sh index dbd08ba..2a98f16 100644 --- a/satellit_upgrader/updater.template.sh +++ b/satellit_upgrader/updater.template.sh @@ -441,12 +441,19 @@ if which "atftpd" &>/dev/null || dpkg-query -W -f='${db:Status-Abbrev}' "atftpd" || ! which "in.tftpd" &>/dev/null; then if diffcp "tftpd/tftpd-hpa" "/etc/default/tftpd-hpa"; then echo "Replacing atftpd with tftpd-hpa" + systemctl stop atftpd.service failprint apt-get remove -y atftpd || pwarning "Could not uninstall atftpd" failprint apt-get install -y tftpd-hpa || perror "Could not install tftpd-hpa" chg=true fi fi +if [ -e "/etc/systemd/system/atftpd.service" ]; then + systemctl stop atftpd.service + rm -f -- "/etc/systemd/system/atftpd.service" "/etc/systemd/system/multi-user.target.wants/atftpd.service" + chg=true +fi + diffcp "tftpd/tftpd-hpa" "/etc/default/tftpd-hpa" && chg=true diffcp "tftpd/tftpd-hpa.service" "/etc/systemd/system/tftpd-hpa.service" && chg=true if "$chg"; then -- cgit v1.2.3-55-g7522