aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2017-08-20 20:38:15 +0000
committerMarius Strobl <marius@FreeBSD.org>2017-08-20 20:38:15 +0000
commitae47d9383f8f548a4a32100ab3946041a2964bf6 (patch)
tree370d2e51cb721a8a7e43aa410d2a2f428705743d
parent9ed84d55c17ae424b71246d32217ad6d8b89e975 (diff)
downloadsrc-ae47d9383f8f548a4a32100ab3946041a2964bf6.tar.gz
src-ae47d9383f8f548a4a32100ab3946041a2964bf6.zip
Bring back the much more readable unified format for differences in
/etc/{group,master.passwd}. This was originally turned on for all of /etc/{aliases,group,master.passwd} in r55196, but then backed out only for the latter two in r56697, as the adaption of the sed(1)ing done in r56308 was incorrect. This left us with inconsistent diff(1) formats in the daily output of periodic(8) ever since, despite in r56697 having been promised to be revisited. So properly adapt the password hash filtering to the unified format and turn the later on again for /etc/{group,master.passwd}, too.
Notes
Notes: svn path=/head/; revision=322726
-rwxr-xr-xetc/periodic/daily/200.backup-passwd6
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/periodic/daily/200.backup-passwd b/etc/periodic/daily/200.backup-passwd
index 5c585aff5f3c..aef20c5b70b2 100755
--- a/etc/periodic/daily/200.backup-passwd
+++ b/etc/periodic/daily/200.backup-passwd
@@ -41,8 +41,8 @@ case "$daily_backup_passwd_enable" in
then
[ $rc -lt 1 ] && rc=1
echo "$host passwd diffs:"
- diff -I '^#' $bak/master.passwd.bak /etc/master.passwd |\
- sed 's/^\([<>] [^:]*\):[^:]*:/\1:(password):/'
+ diff -uI '^#' $bak/master.passwd.bak /etc/master.passwd |\
+ sed 's/^\([-+][^-+:]*\):[^:]*:/\1:(password):/'
mv $bak/master.passwd.bak $bak/master.passwd.bak2
cp -p /etc/master.passwd $bak/master.passwd.bak || rc=3
fi
@@ -58,7 +58,7 @@ case "$daily_backup_passwd_enable" in
then
[ $rc -lt 1 ] && rc=1
echo "$host group diffs:"
- diff $bak/group.bak /etc/group
+ diff -u $bak/group.bak /etc/group
mv $bak/group.bak $bak/group.bak2
cp -p /etc/group $bak/group.bak || rc=3
fi