Sollte erstmal so ok sein.
authorheiko
Fri, 17 Nov 2006 21:32:29 +0000
changeset 1 b36b9eee9c41
parent 0 4bc43250587a
child 2 da03db987aae
Sollte erstmal so ok sein.
Makefile
debian/README.Debian
debian/changelog
debian/control
debian/cron.d.ex
debian/dirs
debian/emacsen-install.ex
debian/emacsen-remove.ex
debian/emacsen-startup.ex
debian/ha-config-default.ex
debian/ha-config.config
debian/ha-config.doc-base.EX
debian/ha-config.templates
debian/ha-sync-default.ex
debian/ha-sync.config
debian/ha-sync.doc-base.EX
debian/ha-sync.templates
debian/init.d.ex
debian/manpage.1.ex
debian/manpage.sgml.ex
debian/manpage.xml.ex
debian/menu.ex
debian/postinst
debian/postrm
debian/preinst
debian/prerm.ex
debian/rules
debian/watch.ex
exclude.ex
ha-sync
ha-sync.conf.ex
--- a/Makefile	Fri Nov 17 10:15:27 2006 +0000
+++ b/Makefile	Fri Nov 17 21:32:29 2006 +0000
@@ -5,9 +5,12 @@
 
 install:
 	install -d $(DESTDIR)/boot/ha-config
-	install -m755 ha-sync $(DESTDIR)/sbin/ha-sync
-	install -m644 exclude.ex $(DESTDIR)/etc/ha-sync/exclude
-	install -m644 ha-sync.conf.ex $(DESTDIR)/etc/ha-sync/ha-sync.conf
+	install -d $(DESTDIR)/etc/ha-sync
+
+	install -m755 ha-sync $(DESTDIR)/usr/sbin/ha-sync
+
+	install -d $(DESTDIR)/usr/share/doc/ha-sync/examples
+	install -m644 *.ex $(DESTDIR)/usr/share/doc/ha-sync/examples
 
 	install -m755 ha-config $(DESTDIR)/etc/init.d/ha-config
 	install -m755 ha-hostname $(DESTDIR)/etc/init.d/ha-hostname
--- a/debian/README.Debian	Fri Nov 17 10:15:27 2006 +0000
+++ b/debian/README.Debian	Fri Nov 17 21:32:29 2006 +0000
@@ -1,4 +1,4 @@
-ha-config for Debian
+ha-sync for Debian
 --------------------
 
 <possible notes regarding this package - if none, delete this file>
--- a/debian/changelog	Fri Nov 17 10:15:27 2006 +0000
+++ b/debian/changelog	Fri Nov 17 21:32:29 2006 +0000
@@ -1,4 +1,10 @@
-ha-config (0.1-1) testing; urgency=low
+ha-sync (0.2-1) testing; urgency=low
+
+  * exclude list improved
+
+ -- Heiko Schlittermann <hs@schlittermann.de>  Thu, 17 Nov 2006 22:05:28 +0000
+
+ha-sync (0.1-1) testing; urgency=low
 
   * Initial release
 
--- a/debian/control	Fri Nov 17 10:15:27 2006 +0000
+++ b/debian/control	Fri Nov 17 21:32:29 2006 +0000
@@ -1,12 +1,12 @@
-Source: ha-config
+Source: ha-sync
 Section: unknown
 Priority: extra
 Maintainer: Heiko Schlittermann <hs@schlittermann.de>
 Build-Depends: debhelper (>= 5)
 Standards-Version: 3.7.2
 
-Package: ha-config
+Package: ha-sync
 Architecture: all
-Depends: ${shlibs:Depends}, ${misc:Depends}, ssh, rsync
+Depends: ${shlibs:Depends}, ${misc:Depends}, ucf, ssh, rsync, stow
 Description: sync script for ha cluster
  script helping to keep clusters in sync
--- a/debian/cron.d.ex	Fri Nov 17 10:15:27 2006 +0000
+++ b/debian/cron.d.ex	Fri Nov 17 21:32:29 2006 +0000
@@ -1,4 +1,4 @@
 #
-# Regular cron jobs for the ha-config package
+# Regular cron jobs for the ha-sync package
 #
-0 4	* * *	root	ha-config_maintenance
+0 4	* * *	root	ha-sync_maintenance
--- a/debian/dirs	Fri Nov 17 10:15:27 2006 +0000
+++ b/debian/dirs	Fri Nov 17 21:32:29 2006 +0000
@@ -1,4 +1,3 @@
-sbin
+usr/sbin
 etc/ha-sync
-boot/ha-config
 etc/init.d
--- a/debian/emacsen-install.ex	Fri Nov 17 10:15:27 2006 +0000
+++ b/debian/emacsen-install.ex	Fri Nov 17 21:32:29 2006 +0000
@@ -1,12 +1,12 @@
 #! /bin/sh -e
-# /usr/lib/emacsen-common/packages/install/ha-config
+# /usr/lib/emacsen-common/packages/install/ha-sync
 
 # Written by Jim Van Zandt <jrv@debian.org>, borrowing heavily
 # from the install scripts for gettext by Santiago Vila
 # <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>.
 
 FLAVOR=$1
-PACKAGE=ha-config
+PACKAGE=ha-sync
 
 if [ ${FLAVOR} = emacs ]; then exit 0; fi
 
--- a/debian/emacsen-remove.ex	Fri Nov 17 10:15:27 2006 +0000
+++ b/debian/emacsen-remove.ex	Fri Nov 17 21:32:29 2006 +0000
@@ -1,13 +1,13 @@
 #!/bin/sh -e
-# /usr/lib/emacsen-common/packages/remove/ha-config
+# /usr/lib/emacsen-common/packages/remove/ha-sync
 
 FLAVOR=$1
-PACKAGE=ha-config
+PACKAGE=ha-sync
 
 if [ ${FLAVOR} != emacs ]; then
     if test -x /usr/sbin/install-info-altdir; then
         echo remove/${PACKAGE}: removing Info links for ${FLAVOR}
-        install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/info/ha-config.info.gz
+        install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/info/ha-sync.info.gz
     fi
 
     echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
--- a/debian/emacsen-startup.ex	Fri Nov 17 10:15:27 2006 +0000
+++ b/debian/emacsen-startup.ex	Fri Nov 17 21:32:29 2006 +0000
@@ -1,25 +1,25 @@
 ;; -*-emacs-lisp-*-
 ;;
-;; Emacs startup file, e.g.  /etc/emacs/site-start.d/50ha-config.el
-;; for the Debian ha-config package
+;; Emacs startup file, e.g.  /etc/emacs/site-start.d/50ha-sync.el
+;; for the Debian ha-sync package
 ;;
 ;; Originally contributed by Nils Naumann <naumann@unileoben.ac.at>
 ;; Modified by Dirk Eddelbuettel <edd@debian.org>
 ;; Adapted for dh-make by Jim Van Zandt <jrv@debian.org>
 
-;; The ha-config package follows the Debian/GNU Linux 'emacsen' policy and
+;; The ha-sync package follows the Debian/GNU Linux 'emacsen' policy and
 ;; byte-compiles its elisp files for each 'emacs flavor' (emacs19,
 ;; xemacs19, emacs20, xemacs20...).  The compiled code is then
 ;; installed in a subdirectory of the respective site-lisp directory.
 ;; We have to add this to the load-path:
 (let ((package-dir (concat "/usr/share/"
                            (symbol-name flavor)
-                           "/site-lisp/ha-config")))
-;; If package-dir does not exist, the ha-config package must have
+                           "/site-lisp/ha-sync")))
+;; If package-dir does not exist, the ha-sync package must have
 ;; removed but not purged, and we should skip the setup.
   (when (file-directory-p package-dir)
         (setq load-path (cons package-dir load-path))
-       (autoload 'ha-config-mode "ha-config-mode"
-         "Major mode for editing ha-config files." t)
-       (add-to-list 'auto-mode-alist '("\\.ha-config$" . ha-config-mode))))
+       (autoload 'ha-sync-mode "ha-sync-mode"
+         "Major mode for editing ha-sync files." t)
+       (add-to-list 'auto-mode-alist '("\\.ha-sync$" . ha-sync-mode))))
 
--- a/debian/ha-config-default.ex	Fri Nov 17 10:15:27 2006 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-# Defaults for ha-config initscript
-# sourced by /etc/init.d/ha-config
-# installed at /etc/default/ha-config by the maintainer scripts
-
-#
-# This is a POSIX shell fragment
-#
-
-# Additional options that are passed to the Daemon.
-DAEMON_OPTS=""
--- a/debian/ha-config.config	Fri Nov 17 10:15:27 2006 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-#! /bin/sh
-
-echo "*HALLO* $0 :: $@"
-
-set -e
-. /usr/share/debconf/confmodule
-
-HOSTNAME=${HOSTNAME%-*}
-NODES="$HOSTNAME-a $HOSTNAME-b"
-
-db_set ha-config/nodes "$NODES"
-db_input ha-config/nodes
--- a/debian/ha-config.doc-base.EX	Fri Nov 17 10:15:27 2006 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-Document: ha-config
-Title: Debian ha-config Manual
-Author: <insert document author here>
-Abstract: This manual describes what ha-config is
- and how it can be used to
- manage online manuals on Debian systems.
-Section: unknown
-
-Format: debiandoc-sgml
-Files: /usr/share/doc/ha-config/ha-config.sgml.gz
-
-Format: postscript
-Files: /usr/share/doc/ha-config/ha-config.ps.gz
-
-Format: text
-Files: /usr/share/doc/ha-config/ha-config.text.gz
-
-Format: HTML
-Index: /usr/share/doc/ha-config/html/index.html
-Files: /usr/share/doc/ha-config/html/*.html
-
-  
--- a/debian/ha-config.templates	Fri Nov 17 10:15:27 2006 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-Template: ha-config/nodes
-Type: string
-Description: Names of your two nodes
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/ha-sync-default.ex	Fri Nov 17 21:32:29 2006 +0000
@@ -0,0 +1,10 @@
+# Defaults for ha-sync initscript
+# sourced by /etc/init.d/ha-sync
+# installed at /etc/default/ha-sync by the maintainer scripts
+
+#
+# This is a POSIX shell fragment
+#
+
+# Additional options that are passed to the Daemon.
+DAEMON_OPTS=""
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/ha-sync.config	Fri Nov 17 21:32:29 2006 +0000
@@ -0,0 +1,26 @@
+#! /bin/sh
+
+set -e
+. /usr/share/debconf/confmodule
+
+# test "$1" = "purge" && { db_purge ha-sync/nodes; exit; }
+
+# Hostname(s)
+
+db_input high ha-sync/dir || true
+
+HOSTNAME=${HOSTNAME%-*}
+NODES="$HOSTNAME-a $HOSTNAME-b"
+db_set ha-sync/nodes "$NODES"
+db_input high ha-sync/nodes || true
+
+# Filesystems
+FILESYSTEMS=`egrep '[1-9][[:space:]]*$' /etc/fstab | while read dev fs rest; do echo -n "$fs, "; done`
+
+db_subst ha-sync/fs choices ${FILESYSTEMS%, }
+db_input high ha-sync/fs || true
+
+# Exclude file
+db_input low ha-sync/exclude || true
+
+db_go
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/ha-sync.doc-base.EX	Fri Nov 17 21:32:29 2006 +0000
@@ -0,0 +1,22 @@
+Document: ha-sync
+Title: Debian ha-sync Manual
+Author: <insert document author here>
+Abstract: This manual describes what ha-sync is
+ and how it can be used to
+ manage online manuals on Debian systems.
+Section: unknown
+
+Format: debiandoc-sgml
+Files: /usr/share/doc/ha-sync/ha-sync.sgml.gz
+
+Format: postscript
+Files: /usr/share/doc/ha-sync/ha-sync.ps.gz
+
+Format: text
+Files: /usr/share/doc/ha-sync/ha-sync.text.gz
+
+Format: HTML
+Index: /usr/share/doc/ha-sync/html/index.html
+Files: /usr/share/doc/ha-sync/html/*.html
+
+  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/ha-sync.templates	Fri Nov 17 21:32:29 2006 +0000
@@ -0,0 +1,18 @@
+Template: ha-sync/nodes
+Type: string
+Description: Names of your two nodes (space separated)
+
+Template: ha-sync/fs
+Type: multiselect
+Description: filesystems to sync
+Choices: ${choices}
+
+Template: ha-sync/dir
+Type: string
+Description: directory for maintained files
+Default: /boot/ha-config
+
+Template: ha-sync/exclude
+Type: string
+Description: location of the exclude list
+Default: /etc/ha-sync/exclude
--- a/debian/init.d.ex	Fri Nov 17 10:15:27 2006 +0000
+++ b/debian/init.d.ex	Fri Nov 17 21:32:29 2006 +0000
@@ -11,15 +11,15 @@
 #
 
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-DAEMON=/usr/sbin/ha-config
-NAME=ha-config
-DESC=ha-config
+DAEMON=/usr/sbin/ha-sync
+NAME=ha-sync
+DESC=ha-sync
 
 test -x $DAEMON || exit 0
 
-# Include ha-config defaults if available
-if [ -f /etc/default/ha-config ] ; then
-	. /etc/default/ha-config
+# Include ha-sync defaults if available
+if [ -f /etc/default/ha-sync ] ; then
+	. /etc/default/ha-sync
 fi
 
 set -e
--- a/debian/manpage.1.ex	Fri Nov 17 10:15:27 2006 +0000
+++ b/debian/manpage.1.ex	Fri Nov 17 21:32:29 2006 +0000
@@ -16,16 +16,16 @@
 .\" .sp <n>    insert n+1 empty lines
 .\" for manpage-specific macros, see man(7)
 .SH NAME
-ha-config \- program to do something
+ha-sync \- program to do something
 .SH SYNOPSIS
-.B ha-config
+.B ha-sync
 .RI [ options ] " files" ...
 .br
 .B bar
 .RI [ options ] " files" ...
 .SH DESCRIPTION
 This manual page documents briefly the
-.B ha-config
+.B ha-sync
 and
 .B bar
 commands.
@@ -33,7 +33,7 @@
 .\" TeX users may be more comfortable with the \fB<whatever>\fP and
 .\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
 .\" respectively.
-\fBha-config\fP is a program that...
+\fBha-sync\fP is a program that...
 .SH OPTIONS
 These programs follow the usual GNU command line syntax, with long
 options starting with two dashes (`-').
@@ -53,7 +53,7 @@
 .IR "The Rise and Fall of a Fooish Bar" ,
 available via the Info system.
 .SH AUTHOR
-ha-config was written by <upstream author>.
+ha-sync was written by <upstream author>.
 .PP
 This manual page was written by root <root@unknown>,
 for the Debian project (but may be used by others).
--- a/debian/manpage.sgml.ex	Fri Nov 17 10:15:27 2006 +0000
+++ b/debian/manpage.sgml.ex	Fri Nov 17 21:32:29 2006 +0000
@@ -27,7 +27,7 @@
   <!ENTITY dhemail     "<email>root@unknown</email>">
   <!ENTITY dhusername  "root">
   <!ENTITY dhucpackage "<refentrytitle>HA-CONFIG</refentrytitle>">
-  <!ENTITY dhpackage   "ha-config">
+  <!ENTITY dhpackage   "ha-sync">
 
   <!ENTITY debian      "<productname>Debian</productname>">
   <!ENTITY gnu         "<acronym>GNU</acronym>">
--- a/debian/manpage.xml.ex	Fri Nov 17 10:15:27 2006 +0000
+++ b/debian/manpage.xml.ex	Fri Nov 17 21:32:29 2006 +0000
@@ -37,7 +37,7 @@
   <!ENTITY dhemail     "<email>root@unknown</email>">
   <!ENTITY dhusername  "root">
   <!ENTITY dhucpackage "<refentrytitle>HA-CONFIG</refentrytitle>">
-  <!ENTITY dhpackage   "ha-config">
+  <!ENTITY dhpackage   "ha-sync">
 
   <!ENTITY debian      "<productname>Debian</productname>">
   <!ENTITY gnu         "<acronym>GNU</acronym>">
--- a/debian/menu.ex	Fri Nov 17 10:15:27 2006 +0000
+++ b/debian/menu.ex	Fri Nov 17 21:32:29 2006 +0000
@@ -1,2 +1,2 @@
-?package(ha-config):needs="X11|text|vc|wm" section="Apps/see-menu-manual"\
-  title="ha-config" command="/usr/bin/ha-config"
+?package(ha-sync):needs="X11|text|vc|wm" section="Apps/see-menu-manual"\
+  title="ha-sync" command="/usr/bin/ha-sync"
--- a/debian/postinst	Fri Nov 17 10:15:27 2006 +0000
+++ b/debian/postinst	Fri Nov 17 21:32:29 2006 +0000
@@ -1,9 +1,9 @@
 #!/bin/sh
-# postinst script for ha-config
+# 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>
@@ -21,13 +21,54 @@
 case "$1" in
     configure)
 
-    	update-rc.d ha-hostname start 3 S .
-	update-rc.d ha-config start 30 S .
+	{
+	    update-rc.d ha-hostname start 3 S . 
+	    update-rc.d ha-config start 30 S . 
+
+	    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'"
 
-	test -f /etc/ha-sync/id_rsa || {
-		ssh-keygen -N "" -C "ha-sync@`hostname`" -f /etc/ha-sync/id_rsa
-		chmod u=r,go= /etc/ha-sync/id_rsa
-	}
+	    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 $TMP /etc/ha-sync/ha-sync.conf
+
+	## Exclude list
+	ucf /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)
@@ -47,3 +88,4 @@
 exit 0
 
 
+# vim:sts=4 sw=4 aw ai sm:
--- a/debian/postrm	Fri Nov 17 10:15:27 2006 +0000
+++ b/debian/postrm	Fri Nov 17 21:32:29 2006 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# postrm script for ha-config
+# postrm script for ha-sync
 #
 # see: dh_installdeb(1)
 
@@ -22,9 +22,15 @@
 case "$1" in
 
     purge)
+    	{
     	rm -f /etc/ha-sync/id_rsa{,.pub}
 	update-rc.d ha-hostname remove || true
-	update-rc.d ha-config remove || true
+	update-rc.d ha-sync remove || true
+	for p in /etc/ha-sync/{ha-sync.conf,exclude}; do
+		ucf --purge $p; rm -f $p $p.ucf-*
+		ucf --purge $p; rm -f $p $p.ucf-*
+	done
+	} >&2
 	;;
 
     remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
@@ -39,7 +45,7 @@
 # dh_installdeb will replace this with shell code automatically
 # generated by other debhelper scripts.
 
-#DEBHELPER#
+# #DEBHELPER#
 
 exit 0
 
--- a/debian/preinst	Fri Nov 17 10:15:27 2006 +0000
+++ b/debian/preinst	Fri Nov 17 21:32:29 2006 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# preinst script for ha-config
+# preinst script for ha-sync
 #
 # see: dh_installdeb(1)
 
--- a/debian/prerm.ex	Fri Nov 17 10:15:27 2006 +0000
+++ b/debian/prerm.ex	Fri Nov 17 21:32:29 2006 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# prerm script for ha-config
+# prerm script for ha-sync
 #
 # see: dh_installdeb(1)
 
--- a/debian/rules	Fri Nov 17 10:15:27 2006 +0000
+++ b/debian/rules	Fri Nov 17 21:32:29 2006 +0000
@@ -35,7 +35,7 @@
 
 	# Add here commands to compile the package.
 	$(MAKE)
-	#docbook-to-man debian/ha-config.sgml > ha-config.1
+	#docbook-to-man debian/ha-sync.sgml > ha-sync.1
 
 	touch $@
 
@@ -55,8 +55,8 @@
 	dh_clean -k 
 	dh_installdirs
 
-	# Add here commands to install the package into debian/ha-config.
-	$(MAKE) DESTDIR=$(CURDIR)/debian/ha-config install
+	# Add here commands to install the package into debian/ha-sync.
+	$(MAKE) DESTDIR=$(CURDIR)/debian/ha-sync install
 
 
 # Build architecture-independent files here.
--- a/debian/watch.ex	Fri Nov 17 10:15:27 2006 +0000
+++ b/debian/watch.ex	Fri Nov 17 21:32:29 2006 +0000
@@ -8,15 +8,15 @@
 
 # Uncomment to examine a Webpage 
 # <Webpage URL> <string match>
-#http://www.example.com/downloads.php ha-config-(.*)\.tar\.gz
+#http://www.example.com/downloads.php ha-sync-(.*)\.tar\.gz
 
 # Uncomment to examine a Webserver directory
-#http://www.example.com/pub/ha-config-(.*)\.tar\.gz
+#http://www.example.com/pub/ha-sync-(.*)\.tar\.gz
 
 # Uncommment to examine a FTP server
-#ftp://ftp.example.com/pub/ha-config-(.*)\.tar\.gz debian uupdate
+#ftp://ftp.example.com/pub/ha-sync-(.*)\.tar\.gz debian uupdate
 
 # Uncomment to find new files on sourceforge, for debscripts >= 2.9
-# http://sf.net/ha-config/ha-config-(.*)\.tar\.gz
+# http://sf.net/ha-sync/ha-sync-(.*)\.tar\.gz
 
 
--- a/exclude.ex	Fri Nov 17 10:15:27 2006 +0000
+++ b/exclude.ex	Fri Nov 17 21:32:29 2006 +0000
@@ -1,3 +1,11 @@
+# files and directories to be excluded
+# you should remove the next entry to sync anything
+# at all :-)
+# --> REMOVE AT LEAST THIS LINE <--
+/**
+
+*.drbdlinks
+
 /boot/ha-config/current.etc
 /boot/ha-config/current.boot
 /boot/ha-config/links
@@ -21,6 +29,7 @@
 /var/lib/heartbeat/hb_*
 /var/lib/heartbeat/rsctmp
 /var/log/*
+/var/run/heartbeat
 
 /etc/udev/rules.d/z25_persistent-net.rules
 /etc/lvm/.cache
--- a/ha-sync	Fri Nov 17 10:15:27 2006 +0000
+++ b/ha-sync	Fri Nov 17 21:32:29 2006 +0000
@@ -1,11 +1,27 @@
 #! /bin/bash
 
-source /etc/ha-sync/ha-sync.conf
+CONFIG=/etc/ha-sync/ha-sync.conf
+
+source $CONFIG
+test "$NODE_A" \
+	&& test "$NODE_B" \
+	&& test "$FILESYSTEMS" \
+	&& test "$EXCLUDE" \
+	|| {
+	echo "$0: essential config variables are missing from $CONFIG" >&2
+	exit 2
+}
+
+grep "REMOVE AT LEAST THIS LINE" $EXCLUDE -q && {
+	echo "$0: Please review $EXCLUDE first!" >&2
+	exit 2
+}
+
+
 NODES="$NODE_A $NODE_B"
 
-
 # No user serviceable parts inside :-)
-SSHID=/etc/ha-sync/id_rsa"
+SSHID="/etc/ha-sync/id_rsa"
 export RSYNC_RSH="ssh -i $SSHID"
 
 TMP=`getopt -n $0 -o nd -l dry,debug -- "$@"` || exit
--- a/ha-sync.conf.ex	Fri Nov 17 10:15:27 2006 +0000
+++ b/ha-sync.conf.ex	Fri Nov 17 21:32:29 2006 +0000
@@ -1,10 +1,15 @@
 # shell snipped
 
-echo "*** Needs to be configured in /etc/ha-sync/ha-sync.conf" >&2
-exit 1
+# Where are the maintained files:
+DIR=/boot/ha-config
 
+# The two nodes to be maintained:
+# NODE_A=host-a
+# NODE_B=host-b
 NODE_A=
 NODE_B=
 
-FILESYSTEMS="/ /boot"
-DIR=/boot/ha-config
+# Which filesystems to syncronize:
+# FILESYSTEMS="/ /boot"
+FILESYSTEMS=
+