[Python-apps-commits] r7004 - in packages/slapos.tool.grid/trunk/debian (9 files)

arnau at users.alioth.debian.org arnau at users.alioth.debian.org
Fri Apr 29 07:09:39 UTC 2011


    Date: Friday, April 29, 2011 @ 07:09:19
  Author: arnau
Revision: 7004

Configuration is now performed in slapos.tool.format

Modified:
  packages/slapos.tool.grid/trunk/debian/control
  packages/slapos.tool.grid/trunk/debian/postrm
Deleted:
  packages/slapos.tool.grid/trunk/debian/conf/
  packages/slapos.tool.grid/trunk/debian/config
  packages/slapos.tool.grid/trunk/debian/dirs
  packages/slapos.tool.grid/trunk/debian/examples
  packages/slapos.tool.grid/trunk/debian/po/
  packages/slapos.tool.grid/trunk/debian/postinst
  packages/slapos.tool.grid/trunk/debian/templates

Deleted: packages/slapos.tool.grid/trunk/debian/config
===================================================================
--- packages/slapos.tool.grid/trunk/debian/config	2011-04-29 06:59:20 UTC (rev 7003)
+++ packages/slapos.tool.grid/trunk/debian/config	2011-04-29 07:09:19 UTC (rev 7004)
@@ -1,37 +0,0 @@
-#!/bin/sh
-set -e
-
-#DEBHELPER#
-
-. /usr/share/debconf/confmodule
-
-CONFIG_FILE=/etc/slapos/slapgrid.cfg
-MASTER_URL=
-COMPUTER_ID=
-
-if [ -f "$CONFIG_FILE" ]; then
-    MASTER_URL="`sed -ne 's#^master_url[^=]*=\s*\(.*\)$#\1#p' \"$CONFIG_FILE\"`"
-    COMPUTER_ID="`sed -ne 's#^computer_id[^=]*=\s*\(.*\)$#\1#p' \"$CONFIG_FILE\"`"
-fi
-
-if [ -n "$MASTER_URL" ]; then
-    db_set slapgrid/master_url "$MASTER_URL"
-    db_input medium slapgrid/master_url || true
-else
-    db_input high slapgrid/master_url || true
-fi
-
-db_go || true
-db_get slapgrid/master_url
-( echo "$RET" | grep -q "^https://" ) && db_input high slapgrid/master_url_with_ssl_note || true
-
-if [ -n "$COMPUTER_ID" ]; then
-    db_set slapgrid/computer_id "$COMPUTER_ID"
-    db_input medium slapgrid/computer_id || true
-else
-    db_input high slapgrid/computer_id || true
-fi
-
-db_go || true
-
-exit 0

Modified: packages/slapos.tool.grid/trunk/debian/control
===================================================================
--- packages/slapos.tool.grid/trunk/debian/control	2011-04-29 06:59:20 UTC (rev 7003)
+++ packages/slapos.tool.grid/trunk/debian/control	2011-04-29 07:09:19 UTC (rev 7004)
@@ -5,7 +5,6 @@
 Build-Depends: python-setuptools (>= 0.6b3),
                python (>= 2.6.6-3~),
                debhelper (>= 7.4.3)
-Build-Depends-Indep: po-debconf
 Standards-Version: 3.9.2
 X-Python-Version: >= 2.6
 Homepage: http://www.slapos.org

Deleted: packages/slapos.tool.grid/trunk/debian/dirs
===================================================================
--- packages/slapos.tool.grid/trunk/debian/dirs	2011-04-29 06:59:20 UTC (rev 7003)
+++ packages/slapos.tool.grid/trunk/debian/dirs	2011-04-29 07:09:19 UTC (rev 7004)
@@ -1,4 +0,0 @@
-etc/slapos/
-etc/slapos/ssl/
-var/log/slapos/
-var/cache/slapos/certificates/

Deleted: packages/slapos.tool.grid/trunk/debian/examples
===================================================================
--- packages/slapos.tool.grid/trunk/debian/examples	2011-04-29 06:59:20 UTC (rev 7003)
+++ packages/slapos.tool.grid/trunk/debian/examples	2011-04-29 07:09:19 UTC (rev 7004)
@@ -1 +0,0 @@
-debian/conf/slapgrid.cfg

Deleted: packages/slapos.tool.grid/trunk/debian/postinst
===================================================================
--- packages/slapos.tool.grid/trunk/debian/postinst	2011-04-29 06:59:20 UTC (rev 7003)
+++ packages/slapos.tool.grid/trunk/debian/postinst	2011-04-29 07:09:19 UTC (rev 7004)
@@ -1,67 +0,0 @@
-#!/bin/sh
-set -e
-
-#DEBHELPER#
-
-. /usr/share/debconf/confmodule
-
-CONFIG_FILE=/etc/slapos/slapgrid.cfg
-if [ ! -f "$CONFIG_FILE" ]; then
-    cp /usr/share/doc/slapgrid/examples/slapgrid.cfg /etc/slapos/slapgrid.cfg
-fi
-
-db_get slapgrid/master_url
-MASTER_URL="$RET"
-WITH_HTTPS=$(echo "$MASTER_URL" | grep -q "^https://" && echo true || echo false)
-
-db_get slapgrid/computer_id
-COMPUTER_ID="$RET"
-
-# If the admin deleted or commented some variables but then set them
-# via debconf, (re-)add them to the conffile.
-test -z "$MASTER_URL" || grep -Eq '^\s*master_url\s*=' $CONFIG_FILE || \
-    echo "master_url = " >> $CONFIG_FILE
-test -z "$COMPUTER_ID" || grep -Eq '^\s*computer_id\s*=' $CONFIG_FILE || \
-    echo "computer_id =" >> $CONFIG_FILE
-
-sed -i "s#^\s*master_url\s*=.*#master_url = $MASTER_URL#;s#^\s*computer_id\s*=.*#computer_id = $COMPUTER_ID#" \
-    $CONFIG_FILE
-
-# And now handle HTTPS URLs
-HAS_KEY_FILE=$(grep -Eq '^\s*key_file\s*=' $CONFIG_FILE && \
-    echo true || echo false)
-
-HAS_CERT_FILE=$(grep -Eq '^\s*cert_file\s*=' $CONFIG_FILE && \
-    echo true || echo false)
-
-HAS_CERTIFICATE_REPOSITORY_PATH=$(grep -Eq '^\s*certificate_repository_path\s*=' $CONFIG_FILE && \
-    echo true || echo false)
-
-if $WITH_HTTPS; then
-    if ! $HAS_KEY_FILE; then
-	echo "key_file = /etc/slapos/ssl/slapgrid.key" >> $CONFIG_FILE
-    fi
-
-    if ! $HAS_CERT_FILE; then
-	echo "cert_file = /etc/slapos/ssl/slapgrid.crt" >> $CONFIG_FILE
-    fi
-
-    if ! $HAS_CERTIFICATE_REPOSITORY_PATH; then
-	echo "certificate_repository_path = /var/cache/slapos/certificates/" >> \
-	    $CONFIG_FILE
-    fi
-else
-    if $HAS_KEY_FILE; then
-	sed -i "/^[^#]*key_file/d" $CONFIG_FILE
-    fi
-
-    if $HAS_CERT_FILE; then
-	sed -i "/^[^#]*cert_file/d" $CONFIG_FILE
-    fi
-
-    if $HAS_CERTIFICATE_REPOSITORY_PATH; then
-	sed -i "/^[^#]*certificate_repository_path/d" $CONFIG_FILE
-    fi
-fi
-
-exit 0

Modified: packages/slapos.tool.grid/trunk/debian/postrm
===================================================================
--- packages/slapos.tool.grid/trunk/debian/postrm	2011-04-29 06:59:20 UTC (rev 7003)
+++ packages/slapos.tool.grid/trunk/debian/postrm	2011-04-29 07:09:19 UTC (rev 7004)
@@ -1,20 +1,12 @@
 #!/bin/sh
 set -e
 
-CONFIG_DIR="/etc/slapos"
-
 case "$1" in
     purge)
-	if [ -d "$CONFIG_DIR" ]; then
-	    rm -f "$CONFIG_DIR"/slapgrid.cfg
-	    [ $(ls "$CONFIG_DIR" | wc -l) -eq 0 ] && rmdir "$CONFIG_DIR"
-	    test -d /etc/slapos/ssl/ && rm -rf /etc/slapos/ssl/
+	if [ -d "/var/log/slapos" ]; then
+	    test -f /var/log/slapos/slapgrid.log && rm -f /var/log/slapos/slapgrid.log
+	    [ $(ls /var/log/slapos/ | wc -l) -eq 0 ] && rmdir /var/log/slapos/
 	fi
-
-	test -d /var/cache/slapos/certificates/ && \
-	    rm -rf /var/cache/slapos/certificates
-
-	test -d /var/log/slapos/ && rm -rf /var/log/slapos/
 	;;
 esac
 

Deleted: packages/slapos.tool.grid/trunk/debian/templates
===================================================================
--- packages/slapos.tool.grid/trunk/debian/templates	2011-04-29 06:59:20 UTC (rev 7003)
+++ packages/slapos.tool.grid/trunk/debian/templates	2011-04-29 07:09:19 UTC (rev 7004)
@@ -1,16 +0,0 @@
-Template: slapgrid/master_url
-Type: string
-_Description: The HTTP or HTTPS URL where the master node can be reached:
-
-Template: slapgrid/master_url_with_ssl_note
-Type: note
-_Description: Note about HTTPS master URL
- As you entered an HTTPS URL for the master node, you *must* put the
- corresponding key and certificate respectively in
- /etc/slapos/ssl/slapgrid.key and /etc/slapos/ssl/slapgrid.crt.
- .
- Also, make sure that the key is only readable by root user!
-
-Template: slapgrid/computer_id
-Type: string
-_Description: ID to uniquely identifies this computer on the master:




More information about the Python-apps-commits mailing list