Browse Source

list package changes in daily insecurity output

ok henning
OPENBSD_4_3
sthen 17 years ago
parent
commit
da71d2e0c3
1 changed files with 22 additions and 1 deletions
  1. +22
    -1
      src/etc/security

+ 22
- 1
src/etc/security View File

@ -1,6 +1,6 @@
#!/bin/sh - #!/bin/sh -
# #
# $OpenBSD: security,v 1.78 2007/08/22 12:03:26 henning Exp $
# $OpenBSD: security,v 1.79 2007/10/23 11:19:58 sthen Exp $
# from: @(#)security 8.1 (Berkeley) 6/9/93 # from: @(#)security 8.1 (Berkeley) 6/9/93
# #
@ -732,3 +732,24 @@ for d in `df -ln | sed -n 's:^/dev/\([a-z]*[0-9]*\)[a-p].*$:\1:p' | sort -u`; do
fi fi
rm -f $file rm -f $file
done done
# Backup the list of installed packages and produce diffs when it changes.
file=/var/backups/pkglist
CUR=$file.current
BACK=$file.backup
if pkg_info > $file 2>&1 ; then
if [ -s $CUR ] ; then
diff -u $CUR $file > $OUTPUT
if [ -s $OUTPUT ] ; then
echo "\n======\nInstalled package changes (-OLD +NEW)\n======"
cat $OUTPUT
cp -p $CUR $BACK
cp -p $file $CUR
chown root:wheel $CUR $BACK
fi
else
cp -p $file $CUR
chown root:wheel $CUR
fi
fi
rm -f $file

Loading…
Cancel
Save