diff options
author | David De La Harpe Golden (Squared Financial) <dgolden@squaredfinancial.com> | 2012-05-31 18:27:06 +0100 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-06-02 18:05:30 -0400 |
commit | 6e7aab39cced00eae03040753c85527aab573319 (patch) | |
tree | 30431d5c28204fe2797668bfa9b6691089ae383b /update-ignore.d/01update-ignore | |
parent | 40eeedebb6be23035aea9d15aed1be706479ce79 (diff) |
Preserve unmanaged ignore file entries on uninit (#673996)
Signed-off-by: David De La Harpe Golden (Squared Financial) <dgolden@squaredfinancial.com>
Diffstat (limited to 'update-ignore.d/01update-ignore')
-rwxr-xr-x | update-ignore.d/01update-ignore | 10 |
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 |