[Pkg-nagios-changes] [SCM] Debian packaging of icinga-web branch, master, updated. debian/1.7.1-1-8-gd0b47cf

Markus Frosch markus at lazyfrosch.de
Wed Jun 27 18:23:18 UTC 2012


The following commit has been merged in the master branch:
commit d345062386d2a471236c41fb87ce664ed2978b56
Author: Markus Frosch <markus at lazyfrosch.de>
Date:   Wed Jun 27 19:37:26 2012 +0200

    disabled root password stuff when dbconfig is not chosen

diff --git a/debian/icinga-web.config b/debian/icinga-web.config
index eb0714e..d160d5a 100644
--- a/debian/icinga-web.config
+++ b/debian/icinga-web.config
@@ -55,27 +55,31 @@ db_go || true
 
 ###
 # Configure the root password for icinga-web
+# only when dbconfig-common is used...
 ###
-passwordsmatch=no
-while [ "$passwordsmatch" != "yes" ]; do
-    # enter password
-    db_input high icinga-web/rootpassword || true
-    db_input high icinga-web/rootpassword-repeat || true
-    db_go || true
-    # verify input
-    db_get icinga-web/rootpassword
-    p1="$RET"
-    db_get icinga-web/rootpassword-repeat
-    p2="$RET"
-    if [ "$p1" = "$p2" ]; then
-        passwordsmatch="yes"
-    else
-        db_fset icinga-web/rootpassword seen false
-        db_fset icinga-web/rootpassword-repeat seen false
-        db_fset icinga-web/rootpassword-mismatch seen false
-        db_input critical icinga-web/rootpassword-mismatch || true
-    fi
-done
+db_get icinga-web/dbconfig-install || true
+if [ "$RET" = "true" ]; then
+    passwordsmatch=no
+    while [ "$passwordsmatch" != "yes" ]; do
+        # enter password
+        db_input high icinga-web/rootpassword || true
+        db_input high icinga-web/rootpassword-repeat || true
+        db_go || true
+        # verify input
+        db_get icinga-web/rootpassword
+        p1="$RET"
+        db_get icinga-web/rootpassword-repeat
+        p2="$RET"
+        if [ "$p1" = "$p2" ]; then
+            passwordsmatch="yes"
+        else
+            db_fset icinga-web/rootpassword seen false
+            db_fset icinga-web/rootpassword-repeat seen false
+            db_fset icinga-web/rootpassword-mismatch seen false
+            db_input critical icinga-web/rootpassword-mismatch || true
+        fi
+    done
+fi
 
 db_go || true
 
diff --git a/debian/icinga-web.postinst b/debian/icinga-web.postinst
index 890385b..2dff7af 100644
--- a/debian/icinga-web.postinst
+++ b/debian/icinga-web.postinst
@@ -161,10 +161,14 @@ setpassword() {
 
 db_get icinga-web/rootpassword || true
 password="$RET"
-if [ "$password" != "" ]; then
-    setpassword $password
-else
-    echo "no password configured - root password for Icinga Web will not be set!"
+db_get icinga-web/dbconfig-install || true
+dbinstall="$RET"
+if [ "$dbinstall" = "true" ]; then
+    if [ "$password" != "" ]; then
+        setpassword $password
+    else
+        echo "no password configured - root password for Icinga Web will not be set!"
+    fi
 fi
 
 ###

-- 
Debian packaging of icinga-web



More information about the Pkg-nagios-changes mailing list