summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog7
-rwxr-xr-xpre-commit.d/30store-metadata2
2 files changed, 8 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 5ce30cd..c6878cb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+etckeeper (0.31) UNRELEASED; urgency=low
+
+ * Avoid relying on USER being set, won't be for cron job.
+ Closes: #515602
+
+ -- Joey Hess <joeyh@debian.org> Mon, 16 Feb 2009 15:40:18 -0500
+
etckeeper (0.30) unstable; urgency=low
* Add vim .*.sw? files to default ignores.
diff --git a/pre-commit.d/30store-metadata b/pre-commit.d/30store-metadata
index 0416ec6..f4125f6 100755
--- a/pre-commit.d/30store-metadata
+++ b/pre-commit.d/30store-metadata
@@ -73,7 +73,7 @@ generate_metadata() {
fi
# Find all files and directories that don't have the current user as the owner
- find $NOVCS \! -user "$USER" -exec stat --format="maybe chown %U '{}'" {} \; \
+ find $NOVCS \! -user "$(id -u)" -exec stat --format="maybe chown %U '{}'" {} \; \
| sort | filter_unknown 'maybe chown' owner
# Find all files and directories that don't have root as the group
find $NOVCS \! -group $(id -g) -exec stat --format="maybe chgrp %G '{}'" {} \; \