...
template="... %systray_dock"
}
+
+Adding configuration files to the defaults
+
+Ion3 extension packages may add and remove configuration files to
+those included by cfg_defaults.lua. The configuration files must be
+installed under /etc/X11/ion3. Run "install-ion3-cfg cfg_foo" in the
+postinst script to add the configuration file
+/etc/X11/ion3/cfg_foo.lua. Run "install-ion3-cfg --remove cfg_foo" in
+the prerm script to remove it.
--- /dev/null
+#!/bin/bash
+
+set -e
+
+usage() {
+ echo >&2 "Usage: install-ion3-cfg [--remove] config-basename"
+}
+
+config_dir=/etc/X11/ion3
+config_list=$config_dir/cfg_debian_ext.lua
+
+action=add
+
+while true; do
+ case "$1" in
+ -h|--help)
+ usage
+ exit 0
+ ;;
+ --remove)
+ action=remove
+ ;;
+ -*)
+ usage
+ exit 2
+ ;;
+ *)
+ break
+ ;;
+ esac
+ shift
+done
+
+if [ $# -ne 1 ]; then
+ usage
+ exit 2
+fi
+
+name="$1"
+
+case $action in
+ add)
+ if ! [ -f "$config_dir/$name.lua" ]; then
+ echo >&2 "$config_dir/$name.lua does not exist!"
+ exit 2
+ fi
+ if ! egrep -q "^ *dopath *\\( *\"$name\" *\\) *\$" \
+ "$config_list"; then
+ echo "dopath(\"$name\")" >> "$config_list"
+ fi
+ ;;
+ remove)
+ sed -i -r -e "/^ *dopath *\\( *\"$name\" *\\) *\$/d" \
+ "$config_list"
+ ;;
+esac
debian/default etc
debian/overrides/ion3 usr/share/lintian/overrides
debian/watch usr/share/ion3/debian
+debian/install-ion3-cfg usr/sbin
chmod a+x $inst
fi
+# Initialise extra configuration file list if missing
+[ -f /etc/X11/ion3/cfg_debian_ext.lua ] || >/etc/X11/ion3/cfg_debian_ext.lua
+
#DEBHELPER#
# Remove the old now-renamed generated Debian menu
205_ion-lock.diff
206_use-xterm.diff
209_use-etc-default.diff
+210_use-cfg_debian_ext.diff
--- /dev/null
+#! /bin/sh -e
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+--- ion3-20070708.orig/etc/cfg_defaults.lua
++++ ion3-20070708/etc/cfg_defaults.lua
+@@ -15,3 +15,6 @@
+
+ -- Deprecated.
+ dopath("cfg_user", true)
++
++-- Debian extra configuration files
++dopath("cfg_debian_ext")