diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-05-06 14:05:17 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-05-06 14:05:17 -0400 |
commit | c732475d89ae616de5ddd2b05190ae15ebce30ba (patch) | |
tree | a2c841d7fa7e0ff3b87f12ce0d88015002be59c7 | |
parent | 55dcc6bf963f922e1ed5c4bbaaefcfacef57b1d7 (diff) |
Make etckeeper uninit -f disable the prompt.
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | etckeeper.8 | 5 | ||||
-rwxr-xr-x | uninit.d/01prompt | 32 |
3 files changed, 26 insertions, 17 deletions
diff --git a/debian/changelog b/debian/changelog index 4cc10c6..73a315a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +etckeeper (0.35) UNRELEASED; urgency=low + + * Make etckeeper uninit -f disable the prompt. + + -- Joey Hess <joeyh@debian.org> Wed, 06 May 2009 14:04:56 -0400 + etckeeper (0.34) unstable; urgency=low * Add support for mktemp if tempfile is not available. diff --git a/etckeeper.8 b/etckeeper.8 index 0f83b26..9070503 100644 --- a/etckeeper.8 +++ b/etckeeper.8 @@ -44,12 +44,13 @@ This updates the VCS ignore file. Content outside a "managed by etckeeper" block is not touched. This is generally run when upgrading to a new version of etckeeper. .TP -.B uninit +.B uninit [-f] This command DESTROYS DATA! It is the inverse of the init command, removing VCS information and etckeeper's own bookkeeping information from the directory. Use with caution. A typical use case would be to run etckeeper uninit, then modify etckeeper.conf to use a different VCS, and then run -etckeeper init. +etckeeper init. (The -f switch can be used to force uninit without +prompting.) .SH FILES /etc/etckeeper/etckeeper.conf is the configuration file. diff --git a/uninit.d/01prompt b/uninit.d/01prompt index 23e9637..07f2e41 100755 --- a/uninit.d/01prompt +++ b/uninit.d/01prompt @@ -1,18 +1,20 @@ #!/bin/sh set -e -echo "** Warning: This will DESTROY all recorded history for $ETCKEEPER_DIR," -echo "** including the $VCS repository and ignore file." -echo "" -printf "Are you sure you want to do this? [yN] " -read answer -case "$answer" in - [Yy]*) - echo "Proceeding.." - exit 0 - ;; - *) - echo "Aborting etckeeper uninit." - exit 1 - ;; -esac +if [ "$1" != "-f" ]; then + echo "** Warning: This will DESTROY all recorded history for $ETCKEEPER_DIR," + echo "** including the $VCS repository and ignore file." + echo "" + printf "Are you sure you want to do this? [yN] " + read answer + case "$answer" in + [Yy]*) + echo "Proceeding.." + exit 0 + ;; + *) + echo "Aborting etckeeper uninit." + exit 1 + ;; + esac +fi |