debian/postinst
changeset 48 9f66fe44239c
parent 45 377edad75934
child 49 2272c9e2eaf7
--- a/debian/postinst	Wed Nov 30 16:19:44 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-#!/bin/bash
-# postinst script for ha-sync
-#
-# see: dh_installdeb(1)
-set -e
-. /usr/share/debconf/confmodule
-
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <postinst> `abort-remove'
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
-case "$1" in
-    configure)
-
-	{
-	    update-rc.d ha-hostname defaults >/dev/null
-	    update-rc.d ha-config defaults >/dev/null
-
-	    test -f /etc/ha-sync/id_rsa || {
-		    ssh-keygen -N "" -C "ha-sync@`hostname`" -f /etc/ha-sync/id_rsa >&2
-		    chmod u=r,go= /etc/ha-sync/id_rsa
-	    }
-
-	} >&2
-
-
-	TMP=`tempfile`; trap "rm -f $TMP" EXIT
-
-	## Config file 
-	{
-	    echo "# see /usr/share/doc/ha-sync/examples/ha-sync.conf.ex for"
-	    echo "# example"
-	    echo ""
-
-	    db_get ha-sync/dir
-	    echo DIR="'$RET'"
-
-	    db_get ha-sync/nodes
-	    echo "$RET" | while read a b; do 
-		    echo NODE_A="'$a'"
-		    echo NODE_B="'$b'"
-	    done 
-
-	    db_get ha-sync/fs
-	    echo FILESYSTEMS="'${RET//,/}'"
-
-	    db_get ha-sync/exclude
-	    echo EXCLUDE="'$RET'"
-
-	} >> $TMP
-	ucf --debconf-ok $TMP /etc/ha-sync/ha-sync.conf
-
-	## Exclude list
-	ucf --debconf-ok /usr/share/doc/ha-sync/examples/exclude.ex /etc/ha-sync/exclude
-
-	## noch Verzeichnisse
-	source /etc/ha-sync/ha-sync.conf
-	install -d "$DIR";
-	for node in $NODE_A $NODE_B; do
-	    install -d $DIR/$node.etc
-	done
-
-    ;;
-
-    abort-upgrade|abort-remove|abort-deconfigure)
-    ;;
-
-    *)
-        echo "postinst 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
-
-
-# vim:sts=4 sw=4 aw ai sm: