Use /run/iodine instead of /var/run/iodine.
authorgregor herrmann <gregoa@debian.org>
Fri, 1 May 2020 19:23:01 +0000 (21:23 +0200)
committergregor herrmann <gregoa@debian.org>
Fri, 1 May 2020 19:23:01 +0000 (21:23 +0200)
Thanks: Russell Coker for the bug report.
Closes: #856822
debian/iodine.iodined.init
debian/iodined.service
debian/iodined.tmpfile
debian/postinst
debian/preinst [new file with mode: 0644]

index da72abe0f982caf8b6bd856cbfdd99f5b6cc252a..1b626cb08b62bdcdd86689f7d42cdf8e8f1417aa 100644 (file)
@@ -22,7 +22,7 @@ DEFAULT=iodine
 DAEMON_ARGS=""
 PIDFILE=/var/run/$NAME.pid
 SCRIPTNAME=/etc/init.d/$NAME
-CHROOTDIR=/var/run/iodine
+CHROOTDIR=/run/iodine
 
 # Exit if the package is not installed
 [ -x "$DAEMON" ] || exit 0
index 750d3e96ea2fe48a35bcfb3341bd23e59af76375..46429fb3802d32ad2c55aaa89910b4f4367f4f5f 100644 (file)
@@ -5,7 +5,7 @@ Documentation=man:iodined(8)
 
 [Service]
 EnvironmentFile=/etc/default/iodine
-ExecStart=/usr/sbin/iodined -f -u iodine -t /var/run/iodine $IODINED_ARGS -P ${IODINED_PASSWORD}
+ExecStart=/usr/sbin/iodined -f -u iodine -t /run/iodine $IODINED_ARGS -P ${IODINED_PASSWORD}
 Restart=on-failure
 Type=simple
 
index 67836748e151ed127ab3e7af14827d6b2b2d55e1..fe194a1b499c77d0cee04ae5075054bff49461af 100644 (file)
@@ -1 +1 @@
-d /var/run/iodine - - -
+d /run/iodine - - -
index 7e896d05d18cc9a198f8605d6235893ff82c9b71..c5597730afedfb64702bbb431589692237918072 100644 (file)
@@ -30,7 +30,7 @@ case "$1" in
         fi
 
         # and we want a special user
-        adduser --quiet --system --home /var/run/iodine iodine
+        adduser --quiet --system --home /run/iodine iodine
 
         # generate/update /etc/default/iodine
         if [ ! -e $CONFIGFILE ]; then
diff --git a/debian/preinst b/debian/preinst
new file mode 100644 (file)
index 0000000..e9b9079
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/sh
+# preinst script for #PACKAGE#
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+# for details, see https://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    install)
+    ;;
+
+    upgrade)
+        # change the HOME dir of iodine
+        if [ -n "$2" ] && dpkg --compare-versions "$2" lt "0.7.0-10~"; then
+            usermod -d /run/iodine iodine
+        fi
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0