]> the.earth.li Git - mqttdeck.git/commitdiff
lintian: Fix unconditional-use-of-dpkg-statoverride warning
authorJonathan McDowell <noodles@earth.li>
Sun, 27 Apr 2025 09:27:54 +0000 (10:27 +0100)
committerJonathan McDowell <noodles@earth.li>
Sun, 27 Apr 2025 09:27:54 +0000 (10:27 +0100)
debian/postinst

index 02b0a7f51436382142a1d037569e96429d74ecc9..3a6ccb7ededb79706f7a50acdd8037da3b310220 100644 (file)
@@ -9,7 +9,9 @@ if [ "$1" = "configure" ]; then
        fi
 
        # Ensure the config file is owned by us
-       dpkg-statoverride --update --add mqttdeck root 0660 /etc/mqttdeck.ini
+       if ! dpkg-statoverride --list /etc/mqttdeck.ini >/dev/null 2>&1; then
+               dpkg-statoverride --update --add mqttdeck root 0660 /etc/mqttdeck.ini
+       fi
 fi
 
 #DEBHELPER#