summaryrefslogtreecommitdiff
path: root/uninit.d/01prompt
diff options
context:
space:
mode:
Diffstat (limited to 'uninit.d/01prompt')
-rwxr-xr-xuninit.d/01prompt20
1 files changed, 20 insertions, 0 deletions
diff --git a/uninit.d/01prompt b/uninit.d/01prompt
new file mode 100755
index 0000000..8b43937
--- /dev/null
+++ b/uninit.d/01prompt
@@ -0,0 +1,20 @@
+#!/bin/sh
+set -e
+
+if [ "$1" != "-f" ]; then
+ echo "** Warning: This will DESTROY all recorded history for $ETCKEEPER_DIR,"
+ echo "** including the $VCS repository."
+ 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