Subject: Re: Forcing update of config/rc.d files
To: None <>
From: Amitai Schlair <>
List: tech-pkg
Date: 04/12/2005 09:05:55
On Apr 12, 2005, at 8:06 AM, David Brownlee wrote:

> 	Is there any command that can be run to report which installed
> 	config files differ from the defaults in $PREFIX/share/examples?

For config files, this seems to do the trick:

	awk '/^# FILE: .* c .*/ { print $3, $5 }' /var/db/pkg/*/+FILES | \
	while read installed example; do
		cmp -s $installed $example || echo $installed

For rc.d scripts:

	for example in /usr/pkg/share/examples/rc.d/*; do
		installed=/etc/rc.d/`basename $example`
		cmp -s $installed $example || echo $installed

- Amitai