diff options
author | ache <ache@FreeBSD.org> | 1995-09-15 00:31:38 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1995-09-15 00:31:38 +0000 |
commit | 4fe95f1bb3e44289265f9cd6e56fe3b59efe3b8b (patch) | |
tree | c99a81e4ff91b184f73f5585974552101e2a6388 /etc/daily | |
parent | 66a1f35e318d659af51c0a55aa16a239b2b2efc8 (diff) | |
download | FreeBSD-src-4fe95f1bb3e44289265f9cd6e56fe3b59efe3b8b.zip FreeBSD-src-4fe95f1bb3e44289265f9cd6e56fe3b59efe3b8b.tar.gz |
If no passwd.bak/group.bak/aliases.bak exists, put warning and make them,
commands failed in old case
Produce diffs on group and aliases too
Diffstat (limited to 'etc/daily')
-rw-r--r-- | etc/daily | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -49,17 +49,33 @@ fi echo "" echo "Backup passwd and group files:" +if [ ! -f $bak/master.passwd.bak ] ; then + echo "no $bak/master.passwd.bak" + cp -p /etc/master.passwd $bak/master.passwd.bak +fi if cmp -s $bak/master.passwd.bak /etc/master.passwd; then :; else echo "$host passwd diffs:" diff $bak/master.passwd.bak /etc/master.passwd mv $bak/master.passwd.bak $bak/master.passwd.bak2 cp -p /etc/master.passwd $bak/master.passwd.bak fi +if [ ! -f $bak/group.bak ] ; then + echo "no $bak/group.bak" + cp -p /etc/group $bak/group.bak +fi if cmp -s $bak/group.bak /etc/group; then :; else + echo "$host group diffs:" + diff $bak/group.bak /etc/group mv $bak/group.bak $bak/group.bak2 cp -p /etc/group $bak/group.bak fi +if [ ! -f $bak/aliases.bak ] ; then + echo "no $bak/aliases.bak" + cp -p /etc/aliases $bak/aliases.bak +fi if cmp -s $bak/aliases.bak /etc/aliases; then :; else + echo "$host aliases diffs:" + diff $bak/aliases.bak /etc/aliases mv $bak/aliases.bak $bak/aliases.bak2 cp -p /etc/aliases $bak/aliases.bak fi |