Subject: Re: install/34121
To: None <install-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Luke Mewburn <lukem@NetBSD.org>
List: netbsd-bugs
Date: 10/26/2006 06:05:03
The following reply was made to PR install/34121; it has been noted by GNATS.

From: Luke Mewburn <lukem@NetBSD.org>
To: Peter Postma <peter@pointless.nl>
Cc: gnats-bugs@NetBSD.org, lukem@NetBSD.org
Subject: Re: install/34121
Date: Thu, 26 Oct 2006 16:04:19 +1000

 --IU5/I01NYhRvwH70
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Thu, Oct 12, 2006 at 10:40:08PM +0200, Peter Postma wrote:
   | It seems that this message never reached gnats.
   | Trying again.
 
 I don't like the idea of using postinstall to clobber end-user
 configuration files, and AFAICT, pf.conf is in that category.
 
 Maybe use populate_dir() with "onlynew =3D true", instead of compare_dir() ?
 
 
   |=20
   | On Sat, Oct 07, 2006 at 05:08:44PM +0200, Peter Postma wrote:
   | > I've attached a patch which checks for pf.conf and pf.os, but it can =
 easily
   | > overwrite your pf.conf if you're not careful.
   | >=20
   | > I'm not sure if the patch is correct, Luke can you review it?
   | >=20
   | > --=20
   | > Peter Postma
   |=20
   | > Index: postinstall
   | > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
   | > RCS file: /cvsroot/src/usr.sbin/postinstall/postinstall,v
   | > retrieving revision 1.28
   | > diff -u -r1.28 postinstall
   | > --- postinstall	23 Sep 2006 08:27:52 -0000	1.28
   | > +++ postinstall	7 Oct 2006 15:02:42 -0000
   | > @@ -768,6 +768,33 @@
   | >  }
   | > =20
   | >  #
   | > +#	pf
   | > +#
   | > +additem pf "pf configuration being up to date"
   | > +do_pf()
   | > +{
   | > +	[ -n "$1" ] || err 2 "USAGE: do_pf  fix|check"
   | > +	op=3D$1
   | > +	failed=3D0
   | > +
   | > +	find_file_in_dirlist pf.conf "pf.conf" \
   | > +	    ${SRC_DIR}/dist/pf/etc ${DEST_DIR}/etc \
   | > +	    || return 1
   | > +
   | > +	find_file_in_dirlist pf.os "pf.os" \
   | > +	    ${SRC_DIR}/dist/pf/etc ${DEST_DIR}/etc \
   | > +	    || return 1
   | > +
   | > +	compare_dir $op ${dir} ${DEST_DIR}/etc 644 pf.conf
   | > +	failed=3D$(( ${failed} + $? ))
   | > +
   | > +	compare_dir $op ${dir} ${DEST_DIR}/etc 644 pf.os
   | > +	failed=3D$(( ${failed} + $? ))
   | > +
   | > +	return ${failed}
   | > +}
   | > +
   | > +#
   | >  #	postfix
   | >  #
   | >  additem postfix "/etc/postfix/ being up to date"
   |=20
   |=20
   | --=20
   | Peter Postma
 
 --IU5/I01NYhRvwH70
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.5 (NetBSD)
 
 iD8DBQFFQE/jpBhtmn8zJHIRAhEhAKCzJjltLygeZPZuvvSaDswDtZ9rxgCfX8BM
 Jg4gJyXfF+L0YF/3NYg4i4E=
 =y+uS
 -----END PGP SIGNATURE-----
 
 --IU5/I01NYhRvwH70--