Drop armel_ftbfs.patch, fixed upstream.
[debian/iodine.git] / debian / config
index 36e43452b69e985305724b8bc310db95bd40d3d0..73c692209193fd63d01f0df1a4512f1f5496d5f2 100644 (file)
@@ -1,24 +1,24 @@
 #!/bin/sh
 
+CONFIGFILE=/etc/default/iodine
 set -e
-
 . /usr/share/debconf/confmodule
 
-if [ -s /etc/default/iodine ] ; then
-       . /etc/default/iodine
-       if [ -n "$START_IODINED" ] ; then
-               db_set iodine/start_daemon "$START_IODINED"
-       fi
-       if [ -n "$IODINED_ARGS" ] ; then
-               db_set iodine/daemon_options "$IODINED_ARGS"
-       fi
-       if [ -n "$IODINED_PASSWORD" ] ; then
-               db_set iodine/daemon_password "$IODINED_PASSWORD"
-       fi
+getvalue() {
+       awk '/^'"$1"'=/ {sub("^'"$1"'=\"", ""); sub("\"$", ""); value=$0;} END {print value}' /etc/default/iodine
+}
+
+if [ -s $CONFIGFILE ] ; then
+       START_IODINED="$(getvalue START_IODINED)"
+       db_set iodine/start_daemon    "$START_IODINED"
+       IODINED_ARGS="$(getvalue IODINED_ARGS)"
+       db_set iodine/daemon_options  "$IODINED_ARGS"
+       IODINED_PASSWORD="$(getvalue IODINED_PASSWORD)"
+       db_set iodine/daemon_password "$IODINED_PASSWORD"
 fi
 
 db_input medium iodine/start_daemon || true
-db_go
+db_go || true
 
 db_get iodine/start_daemon
 START_DAEMON=$RET
@@ -26,5 +26,5 @@ 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
+       db_go || true
 fi