]> git.proxmox.com Git - mirror_smartmontools-debian.git/commitdiff
Fixed postinst script: Version is only valid when configuring.
authorTobias Frost <tobi@coldtobi.de>
Sat, 21 Nov 2015 17:58:19 +0000 (18:58 +0100)
committerTobias Frost <tobi@coldtobi.de>
Sat, 21 Nov 2015 17:58:19 +0000 (18:58 +0100)
    (Closes: #766146)

debian/changelog
debian/smartmontools.postinst

index 434c898f218cbe4ee4bc21ef0e83451bcd2c610a..17de6b6fb1f10e08c326a7f0cf95e3b4f75c7844 100644 (file)
@@ -8,6 +8,8 @@ smartmontools (6.3+svn4002-2.1) UNRELEASED; urgency=medium
   [ Tobias Frost ]
   * Import patch from Helmut (see above)
   * Remove '/var/lib/smartmontools' on purge (Closes: #766145)
+  * Fixed postinst script: Version is only valid when configuring.
+    (Closes: #766146)
 
  -- Helmut Grohne <helmut@subdivi.de>  Thu, 30 Jul 2015 01:18:49 +0200
 
index b2fcad00d81ddec32b508fb47d27d3ce8961fe11..1297c69c64713e0f88f1b30b1f575d2dc0ca544e 100644 (file)
@@ -2,16 +2,20 @@
 set -e
 
 # Remove shutdown and reboot links; this init script does not need them.
-if dpkg --compare-versions "$2" lt "5.38+svn2879-1"; then
-       if [ -e /etc/rc0.d/K20smartmontools ]; then
-               rm -f /etc/rc0.d/K20smartmontools
+case "$1" in
+  configure)
+       if dpkg --compare-versions "$2" lt "5.38+svn2879-1"; then
+               if [ -e /etc/rc0.d/K20smartmontools ]; then
+                       rm -f /etc/rc0.d/K20smartmontools
+               fi
+               if [ -e /etc/rc6.d/K20smartmontools ]; then
+                       rm -f /etc/rc6.d/K20smartmontools
+               fi
        fi
-       if [ -e /etc/rc6.d/K20smartmontools ]; then
-               rm -f /etc/rc6.d/K20smartmontools
-       fi
-fi
+ ;;
+esac
 
 dpkg-maintscript-helper rm_conffile \
-       /etc/init.d/smartd 6.1+svn3812-1~ smartmontools -- "$@" 
+       /etc/init.d/smartd 6.1+svn3812-1~ smartmontools -- "$@"
 
 #DEBHELPER#