blob: 8c0d4d6c7778b5c156d52951c041f071290f9b06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#!/bin/sh
set -e
status() {
if [ "$VCS" = git ]; then
git status
elif [ "$VCS" = hg ]; then
hg status
fi
}
if [ "$1" = "fail-debconf" ]; then
. /usr/share/debconf/confmodule
db_subst etckeeper/commit_failed VCS "$VCS"
db_input critical etckeeper/commit_failed || true
db_go || true
db_reset etckeeper/commit_failed || true
fi
if etckeeper unclean; then
if ! etckeeper commit "saving uncommitted changes in /etc prior to $HIGHLEVEL_PACKAGE_MANAGER run"; then
if [ -e /usr/share/debconf/confmodule ]; then
$0 fail-debconf
else
echo "error: etckeeper failed to commit changes in /etc using $VCS"
exit 1
fi
fi
fi
|