From 61f7f5cf84c604062b8034deba436f2bddfa340e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 6 May 2009 14:40:02 -0400 Subject: Uninit on purge, guarded by a debconf prompt. Closes: #527218 --- debian/changelog | 1 + debian/control | 2 +- debian/po/cs.po | 17 ++++++++++++++++- debian/po/de.po | 17 ++++++++++++++++- debian/po/eu.po | 17 ++++++++++++++++- debian/po/fi.po | 17 ++++++++++++++++- debian/po/fr.po | 17 ++++++++++++++++- debian/po/gl.po | 17 ++++++++++++++++- debian/po/it.po | 17 ++++++++++++++++- debian/po/ja.po | 16 +++++++++++++++- debian/po/nl.po | 17 ++++++++++++++++- debian/po/pt.po | 17 ++++++++++++++++- debian/po/ru.po | 17 ++++++++++++++++- debian/po/sv.po | 20 +++++++++++++++++--- debian/po/templates.pot | 17 ++++++++++++++++- debian/po/vi.po | 17 ++++++++++++++++- debian/postrm | 31 +++++++++++++++++++++++++++++++ debian/preinst | 3 +++ debian/prerm | 19 +++++++++++++++++++ debian/templates | 9 +++++++++ etckeeper | 13 +++++++++---- 21 files changed, 297 insertions(+), 21 deletions(-) create mode 100644 debian/postrm create mode 100644 debian/prerm diff --git a/debian/changelog b/debian/changelog index 73a315a..03cf25b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ etckeeper (0.35) UNRELEASED; urgency=low * Make etckeeper uninit -f disable the prompt. + * Uninit on purge, guarded by a debconf prompt. Closes: #527218 -- Joey Hess Wed, 06 May 2009 14:04:56 -0400 diff --git a/debian/control b/debian/control index 57d50a7..3c06d14 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: admin Priority: optional Build-Depends: debhelper (>= 7), dpkg-dev (>= 1.9.0), bzr (>= 1.4~), python-central Maintainer: Joey Hess -Standards-Version: 3.8.0 +Standards-Version: 3.8.1 XS-Python-Version: all Vcs-Git: git://git.kitenet.net/etckeeper Homepage: http://kitenet.net/~joey/code/etckeeper/ diff --git a/debian/po/cs.po b/debian/po/cs.po index 6982576..26af935 100644 --- a/debian/po/cs.po +++ b/debian/po/cs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: etckeeper\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" -"POT-Creation-Date: 2008-03-14 01:55-0400\n" +"POT-Creation-Date: 2009-05-06 14:41-0400\n" "PO-Revision-Date: 2007-12-24 13:10+0100\n" "Last-Translator: Miroslav Kure \n" "Language-Team: Czech \n" @@ -36,6 +36,21 @@ msgid "" msgstr "" "Před pokračováním byste měli ručně vyřešit problémy s nezapsanými změnami." +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "" +"Etckeeper is being purged from the system, and was used to store /etc in a " +"${VCS} repository. If you choose to remove the repository, this will DESTROY " +"all history etckeeper has recorded for /etc." +msgstr "" + #~ msgid "Commit changed files in /etc to ${VCS}?" #~ msgstr "Zapsat změněné soubory v /etc do ${VCS}?" diff --git a/debian/po/de.po b/debian/po/de.po index 170630f..a2133c4 100644 --- a/debian/po/de.po +++ b/debian/po/de.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: etckeeper 0.10\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" -"POT-Creation-Date: 2008-03-14 01:55-0400\n" +"POT-Creation-Date: 2009-05-06 14:41-0400\n" "PO-Revision-Date: 2008-01-29 21:41+0100\n" "Last-Translator: Helge Kreutzmann \n" "Language-Team: de \n" @@ -37,6 +37,21 @@ msgstr "" "Sie knnen das Problem mit den nicht-bergebenen nderungen manuell beheben, " "bevor Sie fortfahren." +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "" +"Etckeeper is being purged from the system, and was used to store /etc in a " +"${VCS} repository. If you choose to remove the repository, this will DESTROY " +"all history etckeeper has recorded for /etc." +msgstr "" + #~ msgid "Commit changed files in /etc to ${VCS}?" #~ msgstr "Genderte Dateien in /etc an ${VCS} bergeben?" diff --git a/debian/po/eu.po b/debian/po/eu.po index 8cdae6c..9f5ceba 100644 --- a/debian/po/eu.po +++ b/debian/po/eu.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: etckeeper-eu\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" -"POT-Creation-Date: 2008-03-14 01:55-0400\n" +"POT-Creation-Date: 2009-05-06 14:41-0400\n" "PO-Revision-Date: 2007-12-17 12:47+0100\n" "Last-Translator: Aitor Ibañez \n" "Language-Team: Euskara \n" @@ -40,6 +40,21 @@ msgstr "" "Aurrera jarraitu baino lehen, eskuz erresolbitu beharko ditu onartu gabeko " "aldaketak." +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "" +"Etckeeper is being purged from the system, and was used to store /etc in a " +"${VCS} repository. If you choose to remove the repository, this will DESTROY " +"all history etckeeper has recorded for /etc." +msgstr "" + #~ msgid "Commit changed files in /etc to ${VCS}?" #~ msgstr "Aldaturiko fitxategiak ${VCS}-en onartu?" diff --git a/debian/po/fi.po b/debian/po/fi.po index c6fbcde..51204bc 100644 --- a/debian/po/fi.po +++ b/debian/po/fi.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: etckeeper 0.3\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" -"POT-Creation-Date: 2008-03-14 01:55-0400\n" +"POT-Creation-Date: 2009-05-06 14:41-0400\n" "PO-Revision-Date: 2007-12-12 19:54+0200\n" "Last-Translator: Esko Arajärvi \n" "Language-Team: Finnish \n" @@ -33,6 +33,21 @@ msgid "" msgstr "" "Voit selvittää tallettamattomien muutosten ongelmat käsin ennen jatkamista." +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "" +"Etckeeper is being purged from the system, and was used to store /etc in a " +"${VCS} repository. If you choose to remove the repository, this will DESTROY " +"all history etckeeper has recorded for /etc." +msgstr "" + #~ msgid "Commit changed files in /etc to ${VCS}?" #~ msgstr "Talletetaanko hakemiston /etc muutetut tiedostot ${VCS}in?" diff --git a/debian/po/fr.po b/debian/po/fr.po index e8e0ec1..973e5ee 100644 --- a/debian/po/fr.po +++ b/debian/po/fr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: etckeeper\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" -"POT-Creation-Date: 2008-03-14 01:55-0400\n" +"POT-Creation-Date: 2009-05-06 14:41-0400\n" "PO-Revision-Date: 2007-12-12 08:28+0100\n" "Last-Translator: Jean-Baka Domelevo Entfellner \n" "Language-Team: French \n" @@ -41,6 +41,21 @@ msgstr "" "Avant de poursuivre, vous devriez résoudre vous-même les problèmes liés aux " "changements non sauvegardés." +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "" +"Etckeeper is being purged from the system, and was used to store /etc in a " +"${VCS} repository. If you choose to remove the repository, this will DESTROY " +"all history etckeeper has recorded for /etc." +msgstr "" + #~ msgid "Commit changed files in /etc to ${VCS}?" #~ msgstr "" #~ "Faut-il enregistrer dans ${VCS} les modifications de fichiers faites " diff --git a/debian/po/gl.po b/debian/po/gl.po index fe33fcb..937ccca 100644 --- a/debian/po/gl.po +++ b/debian/po/gl.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: etckeeper\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" -"POT-Creation-Date: 2008-03-14 01:55-0400\n" +"POT-Creation-Date: 2009-05-06 14:41-0400\n" "PO-Revision-Date: 2007-12-11 20:52+0000\n" "Last-Translator: Jacobo Tarrio \n" "Language-Team: Galician \n" @@ -34,6 +34,21 @@ msgid "" "continuing." msgstr "configurar apt para que instale paquetes adicionais do CD.<" +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "" +"Etckeeper is being purged from the system, and was used to store /etc in a " +"${VCS} repository. If you choose to remove the repository, this will DESTROY " +"all history etckeeper has recorded for /etc." +msgstr "" + #~ msgid "Commit changed files in /etc to ${VCS}?" #~ msgstr "¿Gardar en ${VCS} os ficheiros modificados de /etc?" diff --git a/debian/po/it.po b/debian/po/it.po index 80a4b3f..6307bc4 100644 --- a/debian/po/it.po +++ b/debian/po/it.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: etckeeper 0.3 debconf templates\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" -"POT-Creation-Date: 2008-03-14 01:55-0400\n" +"POT-Creation-Date: 2009-05-06 14:41-0400\n" "PO-Revision-Date: 2007-12-14 20:32+0100\n" "Last-Translator: Luca Monducci \n" "Language-Team: Italian \n" @@ -37,6 +37,21 @@ msgstr "" "Potrebbe essere necessario risolvere i problemi con le modifiche delle quali " "non è stato fatto il commit prima di continuare." +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "" +"Etckeeper is being purged from the system, and was used to store /etc in a " +"${VCS} repository. If you choose to remove the repository, this will DESTROY " +"all history etckeeper has recorded for /etc." +msgstr "" + #~ msgid "Commit changed files in /etc to ${VCS}?" #~ msgstr "Commit dei file modificati in /etc a ${VCS}?" diff --git a/debian/po/ja.po b/debian/po/ja.po index 42abf0d..1eb8c5b 100644 --- a/debian/po/ja.po +++ b/debian/po/ja.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: etckeeper 0.23\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" -"POT-Creation-Date: 2008-03-14 01:55-0400\n" +"POT-Creation-Date: 2009-05-06 14:41-0400\n" "PO-Revision-Date: 2008-12-28 22:26+0900\n" "Last-Translator: Hideki Yamane (Debian-JP) \n" "Language-Team: Japanese \n" @@ -36,3 +36,17 @@ msgstr "" "続ける前に、この問題とコミットされていない変更について、手動で解決する必要が" "あるでしょう。" +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "" +"Etckeeper is being purged from the system, and was used to store /etc in a " +"${VCS} repository. If you choose to remove the repository, this will DESTROY " +"all history etckeeper has recorded for /etc." +msgstr "" diff --git a/debian/po/nl.po b/debian/po/nl.po index a4dd509..75115fe 100644 --- a/debian/po/nl.po +++ b/debian/po/nl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: etckeeper\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" -"POT-Creation-Date: 2008-03-14 01:55-0400\n" +"POT-Creation-Date: 2009-05-06 14:41-0400\n" "PO-Revision-Date: 2008-01-01 21:21+0100\n" "Last-Translator: Bart Cornelis \n" "Language-Team: debian-l10n-dutch \n" @@ -39,6 +39,21 @@ msgstr "" "U kunt de problemen met de niet-vastgelegde aanpassingen handmatig oplossen " "alvorens verder te gaan." +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "" +"Etckeeper is being purged from the system, and was used to store /etc in a " +"${VCS} repository. If you choose to remove the repository, this will DESTROY " +"all history etckeeper has recorded for /etc." +msgstr "" + #~ msgid "Commit changed files in /etc to ${VCS}?" #~ msgstr "Wilt u aangepaste bestanden uit de map '/etc' vastleggen in ${VCS}?" diff --git a/debian/po/pt.po b/debian/po/pt.po index de1feeb..4a78a07 100644 --- a/debian/po/pt.po +++ b/debian/po/pt.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: etckeeper 0.3\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" -"POT-Creation-Date: 2008-03-14 01:55-0400\n" +"POT-Creation-Date: 2009-05-06 14:41-0400\n" "PO-Revision-Date: 2007-12-11 20:01+0000\n" "Last-Translator: Américo Monteiro \n" "Language-Team: Portuguese \n" @@ -38,6 +38,21 @@ msgstr "" "Você pode resolver manualmente as situações com as alterações não submetidas " "antes de continuar. " +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "" +"Etckeeper is being purged from the system, and was used to store /etc in a " +"${VCS} repository. If you choose to remove the repository, this will DESTROY " +"all history etckeeper has recorded for /etc." +msgstr "" + #~ msgid "Commit changed files in /etc to ${VCS}?" #~ msgstr "Submeter ficheiros alterados em /etc para o ${VCS}?" diff --git a/debian/po/ru.po b/debian/po/ru.po index 5776848..5863afd 100644 --- a/debian/po/ru.po +++ b/debian/po/ru.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.3\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" -"POT-Creation-Date: 2008-03-14 01:55-0400\n" +"POT-Creation-Date: 2009-05-06 14:41-0400\n" "PO-Revision-Date: 2007-12-12 21:23+0300\n" "Last-Translator: Yuri Kozlov \n" "Language-Team: Russian \n" @@ -40,6 +40,21 @@ msgstr "" "Перед тем как продолжить вы можете исправить это вручную через " "незафиксированные изменения." +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "" +"Etckeeper is being purged from the system, and was used to store /etc in a " +"${VCS} repository. If you choose to remove the repository, this will DESTROY " +"all history etckeeper has recorded for /etc." +msgstr "" + #~ msgid "Commit changed files in /etc to ${VCS}?" #~ msgstr "Зафиксировать изменённые файлы /etc в ${VCS}?" diff --git a/debian/po/sv.po b/debian/po/sv.po index e1f5025..a913ac0 100644 --- a/debian/po/sv.po +++ b/debian/po/sv.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: etckeeper_0.20_sv\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" -"POT-Creation-Date: 2008-03-14 01:55-0400\n" +"POT-Creation-Date: 2009-05-06 14:41-0400\n" "PO-Revision-Date: 2008-07-17 17:25+0200\n" "Last-Translator: Martin Ågren \n" "Language-Team: Swedish \n" @@ -37,6 +37,20 @@ msgid "" "You may manually resolve the issues with the uncommitted changes before " "continuing." msgstr "" -"Du kan lösa problemen med de overkställda ändringarna manuellt innan " -"du fortsätter." +"Du kan lösa problemen med de overkställda ändringarna manuellt innan du " +"fortsätter." +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "" +"Etckeeper is being purged from the system, and was used to store /etc in a " +"${VCS} repository. If you choose to remove the repository, this will DESTROY " +"all history etckeeper has recorded for /etc." +msgstr "" diff --git a/debian/po/templates.pot b/debian/po/templates.pot index e5472e3..93e0fdd 100644 --- a/debian/po/templates.pot +++ b/debian/po/templates.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" -"POT-Creation-Date: 2008-03-14 01:55-0400\n" +"POT-Creation-Date: 2009-05-06 14:41-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -35,3 +35,18 @@ msgid "" "You may manually resolve the issues with the uncommitted changes before " "continuing." msgstr "" + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "" +"Etckeeper is being purged from the system, and was used to store /etc in a " +"${VCS} repository. If you choose to remove the repository, this will DESTROY " +"all history etckeeper has recorded for /etc." +msgstr "" diff --git a/debian/po/vi.po b/debian/po/vi.po index 779a239..5d92440 100644 --- a/debian/po/vi.po +++ b/debian/po/vi.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: etckeeper 0.3\n" "Report-Msgid-Bugs-To: etckeeper@packages.debian.org\n" -"POT-Creation-Date: 2008-03-14 01:55-0400\n" +"POT-Creation-Date: 2009-05-06 14:41-0400\n" "PO-Revision-Date: 2007-12-21 22:43+1030\n" "Last-Translator: Clytie Siddall \n" "Language-Team: Vietnamese \n" @@ -40,6 +40,21 @@ msgstr "" "Bạn vẫn có thể tự giải quyết các vấn đề về các thay đổi chưa ghi chép, trước " "khi tiếp tục." +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "Remove etckeeper ${VCS} repository and associated files?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:3001 +msgid "" +"Etckeeper is being purged from the system, and was used to store /etc in a " +"${VCS} repository. If you choose to remove the repository, this will DESTROY " +"all history etckeeper has recorded for /etc." +msgstr "" + #, fuzzy #~| msgid "Commit changed files in /etc to git?" #~ msgid "Commit changed files in /etc to ${VCS}?" diff --git a/debian/postrm b/debian/postrm new file mode 100644 index 0000000..1dc53aa --- /dev/null +++ b/debian/postrm @@ -0,0 +1,31 @@ +#!/bin/sh +set -e + +if [ "$1" = purge ]; then + if [ -e /etc/.etckeeper ]; then + . /usr/share/debconf/confmodule + + # uninit on purge is tricky because etckeeper's configuration + # and code has been removed at this point. This relies on a + # stashed away copy. + if [ -e /var/cache/etckeeper/stash/etckeeper.conf ] && + [ -d /var/cache/etckeeper/stash/uninit.d ] && + [ -x /var/cache/etckeeper/stash/etckeeper ]; then + . /var/cache/etckeeper/stash/etckeeper.conf + if [ -n "$VCS" ]; then + db_subst etckeeper/purge VCS "$VCS" + db_input high etckeeper/purge || true + db_go || true + db_get etckeeper/purge + if [ "$RET" = true ]; then + ETCKEEPER_CONF_DIR=/var/cache/etckeeper/stash + export ETCKEEPER_CONF_DIR + /var/cache/etckeeper/stash/etckeeper uninit -f || true + fi + fi + fi + fi + rm -rf /var/cache/etckeeper +fi + +#DEBHELPER# diff --git a/debian/preinst b/debian/preinst index b4495fe..dfb3aa8 100644 --- a/debian/preinst +++ b/debian/preinst @@ -69,4 +69,7 @@ install|upgrade) rm_conffile etckeeper "/etc/etckeeper/commit.d/$c" done fi + + # delete files the postrm stashes away to handle purging + rm -rf /var/cache/etckeeper/stash esac diff --git a/debian/prerm b/debian/prerm new file mode 100644 index 0000000..806053a --- /dev/null +++ b/debian/prerm @@ -0,0 +1,19 @@ +#!/bin/sh +set -e + +#DEBHELPER# + +if [ "$1" = remove ]; then + # In case etckeeper is being purged, stash away a copy of + # the files purging will need. + mkdir -p /var/cache/etckeeper/stash + if [ -e /etc/etckeeper/etckeeper.conf ]; then + cp -a /etc/etckeeper/etckeeper.conf /var/cache/etckeeper/stash + fi + if [ -d /etc/etckeeper/uninit.d ]; then + cp -a /etc/etckeeper/uninit.d /var/cache/etckeeper/stash + fi + if [ -x /usr/sbin/etckeeper ]; then + cp -a /usr/sbin/etckeeper /var/cache/etckeeper/stash + fi +fi diff --git a/debian/templates b/debian/templates index 660d594..4638238 100644 --- a/debian/templates +++ b/debian/templates @@ -14,3 +14,12 @@ _Description: Commit failed . You may manually resolve the issues with the uncommitted changes before continuing. + +Template: etckeeper/purge +Type: boolean +Default: false +_Description: Remove etckeeper ${VCS} repository and associated files? + Etckeeper is being purged from the system, and was used to + store /etc in a ${VCS} repository. If you choose to remove the + repository, this will DESTROY all history etckeeper has recorded + for /etc. diff --git a/etckeeper b/etckeeper index 7a6933c..1b6c76c 100755 --- a/etckeeper +++ b/etckeeper @@ -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 -- cgit v1.2.3