This is a discussion on patch: notice changes to installed packages in /etc/security within the mailing.openbsd.tech forums, part of the OpenBSD category; --> any interest in this? Index: etc/security ================================================== ================= RCS file: /cvs/src/etc/security,v retrieving revision 1.78 diff -u -p -r1.78 security ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| any interest in this? Index: etc/security ================================================== ================= RCS file: /cvs/src/etc/security,v retrieving revision 1.78 diff -u -p -r1.78 security --- etc/security 22 Aug 2007 12:03:26 -0000 1.78 +++ etc/security 18 Oct 2007 11:03:51 -0000 @@ -732,3 +732,24 @@ for d in `df -ln | sed -n 's:^/dev/\([a- fi rm -f $file 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 |
| Thread Tools | |
| Display Modes | |
|
|