diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-05-06 14:40:02 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-05-06 14:47:56 -0400 |
commit | 61f7f5cf84c604062b8034deba436f2bddfa340e (patch) | |
tree | 641426c35ff6593a2db50dc4c65199564ce3433b /etckeeper | |
parent | c732475d89ae616de5ddd2b05190ae15ebce30ba (diff) |
Uninit on purge, guarded by a debconf prompt. Closes: #527218
Diffstat (limited to 'etckeeper')
-rwxr-xr-x | etckeeper | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -1,6 +1,11 @@ #!/bin/sh set -e -conf=/etc/etckeeper/etckeeper.conf + +if [ -z "$ETCKEEPER_CONF_DIR" ]; then + ETCKEEPER_CONF_DIR=/etc/etckeeper +fi + +conf="$ETCKEEPER_CONF_DIR/etckeeper.conf" usage() { echo "usage: etckeeper command [-d directory]" >&2 @@ -53,8 +58,8 @@ elif [ "$command" = "pre-apt" ]; then command=pre-install fi -if [ ! -d "/etc/etckeeper/$command.d" ]; then - echo "etckeeper: /etc/etckeeper/$command.d does not exist" >&2 +if [ ! -d "$ETCKEEPER_CONF_DIR/$command.d" ]; then + echo "etckeeper: $ETCKEEPER_CONF_DIR/$command.d does not exist" >&2 exit 1 fi @@ -82,6 +87,6 @@ lsscripts() { ' "$1" } -for script in $(lsscripts "/etc/etckeeper/$command.d"); do +for script in $(lsscripts "$ETCKEEPER_CONF_DIR/$command.d"); do "$script" "$@" done |