summaryrefslogtreecommitdiff
path: root/update-ignore.d/01update-ignore
diff options
context:
space:
mode:
Diffstat (limited to 'update-ignore.d/01update-ignore')
-rwxr-xr-xupdate-ignore.d/01update-ignore10
1 files changed, 8 insertions, 2 deletions
diff --git a/update-ignore.d/01update-ignore b/update-ignore.d/01update-ignore
index b6acf17..8cf524a 100755
--- a/update-ignore.d/01update-ignore
+++ b/update-ignore.d/01update-ignore
@@ -160,8 +160,14 @@ writefile () {
if [ -e "$file" ]; then
if ! grep -q "$managed_by_etckeeper" "$file"; then
- echo "etckeeper: "$file" does not contain \"$managed_by_etckeeper\" comment; not updating"
- exit 1
+ if [ "$1" != "-a" ]; then
+ echo "etckeeper: "$file" does not contain \"$managed_by_etckeeper\" comment; not updating"
+ exit 1
+ else
+ echo "etckeeper: "$file" exists but does not contain \"$managed_by_etckeeper\" comment; updating"
+ writefile
+ exit 0
+ fi
fi
realfile="$file"
if [ -n "`type -p tempfile`" ]; then