[pve-devel] [PATCH ha-manager] Fix postinstall script not removing watchdog-mux.socket

Wolfgang Bumiller w.bumiller at proxmox.com
Thu Feb 4 10:49:53 CET 2016


watchdog-mux.socket was removed in f8a3fc80af but the
postinstall script used -e instead of -L to test for the
symlink, which fails since the destination is already
removed at that point.

Use -L and remove the dead symlink if it exists.

Reported-by: Alexandre Derumier <aderumier at odiso.com>
---
 debian/postinst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/postinst b/debian/postinst
index 667888d..385f78f 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -26,7 +26,7 @@ case "$1" in
 
       # remove the systemd watchdog mux socket service
       # as watchdog-mux should handle this on it's own
-      if [ -e  /etc/systemd/system/sockets.target.wants/watchdog-mux.socket ]; then
+      if [ -L  /etc/systemd/system/sockets.target.wants/watchdog-mux.socket ]; then
 	  rm -f /etc/systemd/system/sockets.target.wants/watchdog-mux.socket
 	  rm -f /var/lib/systemd/deb-systemd-helper-enabled/sockets.target.wants/watchdog-mux.socket
 	  rm -f /var/lib/systemd/deb-systemd-helper-enabled/watchdog-mux.socket.dsh-also
-- 
2.1.4





More information about the pve-devel mailing list