From c732475d89ae616de5ddd2b05190ae15ebce30ba Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 6 May 2009 14:05:17 -0400 Subject: Make etckeeper uninit -f disable the prompt. --- uninit.d/01prompt | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'uninit.d/01prompt') 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 -- cgit v1.2.3