diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-02-14 01:15:47 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-02-14 01:15:51 -0500 |
commit | 607f12f1ada14b4a6d69d745d5a4a7b3db3ecb36 (patch) | |
tree | 96d1a6a78c708d94b637913eff898ab27ab476b9 | |
parent | ec0218e86b32dd80d8cb4e5a69ea7d7c9b5f4ad6 (diff) |
Fix handling of -d in recursive calls to etckeeper
Some etckeeper scripts run 'etckeeper unclean' and other subcommands.
If -d was specified, those subcommands would run on /etc, rather
than the -d directory. Use an env var to propigate the directory to the
subcommands.
-rw-r--r-- | debian/changelog | 1 | ||||
-rwxr-xr-x | etckeeper | 10 |
2 files changed, 8 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog index 15feb06..7a6ce44 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ etckeeper (0.30) UNRELEASED; urgency=low file, only touching the part inside a "managed by etckeeper" comment block. * Run etckeeper update-ignore on upgrade. + * Fix handling of -d in recursive calls to etckeeper -- Joey Hess <joeyh@debian.org> Fri, 13 Feb 2009 22:09:28 -0500 @@ -60,15 +60,19 @@ fi if [ "x$1" = "x-d" ]; then if [ -n "$2" ]; then - cd "$2" + ETCKEEPER_DIR="$2" shift 2 else usage fi -else - cd /etc fi +if [ -z "$ETCKEEPER_DIR" ]; then + ETCKEEPER_DIR=/etc +fi +cd "$ETCKEEPER_DIR" +export ETCKEEPER_DIR + lsscripts() { perl -e ' $dir=shift; |