HOWTO monitor changes in installed packages within jails?
Matthew Seaman
m.seaman at infracaninophile.co.uk
Sat Jul 20 12:53:56 UTC 2013
On 20/07/2013 12:09, Michael Grimm wrote:
> I did migrate to pkgng some month ago, and ever since I am curious
> how to monitor changes in installed packages within jails. I am
> looking for a functionality/port that works like 490.status-
> pkg-changes for my host.
>
> Question: is there any functionality within the periodic system or a
> port that I might have missed to find?
You can't just run 490.status-pkg-changes directly in your jail?
Try this patch:
lucid-nonsense:/tmp:% diff -u 490.status-pkg-changes{.orig,}
--- 490.status-pkg-changes.orig 2013-07-20 13:43:44.306303775 +0100
+++ 490.status-pkg-changes 2013-07-20 13:44:42.055327506 +0100
@@ -10,7 +10,7 @@
case "$daily_status_pkg_changes_enable" in
[Yy][Ee][Ss])
- pkgcmd=/usr/local/sbin/pkg
+ pkgcmd=/usr/local/sbin/pkg $daily_status_pkg_changes_flags
echo
echo 'Changes in installed packages:'
Then add something like the following to /etc/periodic.conf:
daily_status_pkg_changes_flags='-j jailname'
Of course, this only lets you monitor changes in one jail at a time.
You can cover more by copying the script and changing its name eg.
sed -e 's/daily_status_pkg_changes/daily_status_pkg_changes2/g' \
< 490.status-pkg-changes > 490.status-pkg-changes2
Then add appropriate "daily_status_pkg_changes2_flags='-j otherjail'"
settings to periodic.conf
Cheers,
Matthew
--
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey
JID: matthew at infracaninophile.co.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 268 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20130720/6b1fa394/attachment.sig>
More information about the freebsd-questions
mailing list