~xnox/ubuntu/oneiric/etckeeper/dhpy2

« back to all changes in this revision

Viewing changes to uninit.d/01prompt

  • Committer: Bazaar Package Importer
  • Author(s): Thierry Carrez
  • Date: 2009-06-16 11:02:03 UTC
  • mfrom: (6.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090616110203-vhlb6ae33dkhgfi9
Tags: 0.37ubuntu1
* Merge from debian unstable, remaining changes:
  - etckeeper.conf, debian/control: default to bzr
* debian/postinst: Do the initial commit at installation time (LP: #297920)
* commit.d/50vcs-commit: Avoid etckeeper commit failure if 'hostname -f'
  fails (LP: #377265)
* debian/cron.daily: Avoid cron emails with daily autocommits if VCS=hg
  (LP: #364344)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
set -e
3
3
 
4
 
echo "** Warning: This will DESTROY all recorded history for $ETCKEEPER_DIR,"
5
 
echo "** including the $VCS repository and ignore file."
6
 
echo ""
7
 
printf "Are you sure you want to do this? [yN] "
8
 
read answer
9
 
case "$answer" in 
10
 
        [Yy]*)
11
 
                echo "Proceeding.."
12
 
                exit 0
13
 
        ;;
14
 
        *)
15
 
                echo "Aborting etckeeper uninit."
16
 
                exit 1
17
 
        ;;
18
 
esac
 
4
if [ "$1" != "-f" ]; then
 
5
        echo "** Warning: This will DESTROY all recorded history for $ETCKEEPER_DIR,"
 
6
        echo "** including the $VCS repository and ignore file."
 
7
        echo ""
 
8
        printf "Are you sure you want to do this? [yN] "
 
9
        read answer
 
10
        case "$answer" in 
 
11
                [Yy]*)
 
12
                        echo "Proceeding.."
 
13
                        exit 0
 
14
                ;;
 
15
                *)
 
16
                        echo "Aborting etckeeper uninit."
 
17
                        exit 1
 
18
                ;;
 
19
        esac
 
20
fi