On Sunday 15 October 2006 06:40, Walter Dnes wrote: [SNIP] > CONFIG_PROTECT and CONFIG_PROTECT_MASK work at the *DIRECTORY* level. > What I really want/need is a feature that allows additional protection > *FOR INDIVIDUAL FILES*. E.g... > > - my customized /etc/conf.d/local.start or /etc/conf.d/local.stop > should *NEVER* be replaced with an empty version > > - /etc/rc.conf should be left alone too. ***FOR THE UMPTEENTH TIME, > NO I DO NOT WANT NANO REPLACING VIM AS MY "EDITOR"*** > > - /etc/conf.d/clock too. ***FOR THE UMPTEENTH TIME, NO I DO NOT WANT > MY SYSTEM CLOCK SET TO GMT*** > > - /etc/ssmtp/ssmtp.conf too. ***FOR THE UMPTEENTH TIME, NO I DO NOT > WANT MY CUSTOMIZED FILE REPLACED WITH AN EXAMPLE FILE*** > > And the list goes on and on. Howsabout an environmental variable > CONFIG_PROTECT_FILES, containing a list of protected files? I'm ready > to submit a feature request if necessary. Does anybody have additional > comments?
I suspect you don't really understand what CONFIG_PROTECT{,_MASK} is. Please
read the output of `emerge --help --config`. All the files you've mentioned
are covered by CONFIG_PROTECT in a default configuration so if they aren't it
means you've screwed up your CONFIG_PROTECT and/or CONFIG_PROTECT_MASK
variables. Otherwise it is you who overwrote those files with
etc-update/dispatch-conf or whatever you use for that.
I suppose you could work around your own clumsiness ;) by removing the
mentioned files in post_pkg_postinst of sys-apps/baselayout and
mail-mta/ssmtp. Something like e.g.:
# mkdir -p /etc/portage/env/sys-apps && \
echo 'post_pkg_postinst() {
echo "Removing new rc.conf, local.{start,stop} and clock"
rm -fv ${ROOT}/etc/._cfg????_rc.conf \
${ROOT}/etc/conf.d/._cfg????_{local.start,local.stop,clock}
}' >> /etc/portage/env/sys-apps/baselayout
PS: Please don't capitalize your sentences like that. It's really annoying..
--
Bo Andresen
pgpO5dKEewcPa.pgp
Description: PGP signature

