rename {03_,}cflags.patch
[debian/iodine.git] / debian / config
index df31ec13f91a271e425d2c4addd971c9e22f7f10..9ee98564fb9579704cc8e72f728e3941fa416437 100644 (file)
@@ -4,13 +4,22 @@ set -e
 
 . /usr/share/debconf/confmodule
 
+getvalue() {
+       awk '/^'"$1"'=/ {gsub("\"", ""); sub("'"$1"'=", ""); value=$0;} END {print value}' /etc/default/iodine
+}
+
 if [ -s /etc/default/iodine ] ; then
-       . /etc/default/iodine
+       START_IODINED="$(getvalue START_IODINED)"
        if [ -n "$START_IODINED" ] ; then
                db_set iodine/start_daemon "$START_IODINED"
        fi
+       IODINED_ARGS="$(getvalue IODINED_ARGS)"
        if [ -n "$IODINED_ARGS" ] ; then
-               db_set iodine/daemon_options "$DAEMON_IODINED_ARGS"
+               db_set iodine/daemon_options "$IODINED_ARGS"
+       fi
+       IODINED_PASSWORD="$(getvalue IODINED_PASSWORD)"
+       if [ -n "$IODINED_PASSWORD" ] ; then
+               db_set iodine/daemon_password "$IODINED_PASSWORD"
        fi
 fi
 
@@ -22,5 +31,6 @@ START_DAEMON=$RET
 
 if [ "x$START_DAEMON" = "xtrue" ] ; then
        db_input medium iodine/daemon_options || true
+       db_input medium iodine/daemon_password || true
        db_go
 fi