Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Aug 2011 16:07:13 +1000
From:      Peter Jeremy <peterjeremy@acm.org>
To:        freebsd-arch@freebsd.org
Subject:   Regularly updated files in /etc
Message-ID:  <20110831060713.GB37259@server.vk2pj.dyndns.org>

next in thread | raw e-mail | index | archive | help

--U+BazGySraz5kW0T
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

FreeBSD has gradually moved "dynamic" files (those that are automously
updated during normal system operation) out of /etc.  As far as I can
see, there are only 3 such files left:
1) /etc/dumpdates
   This is (optionally) updated by dump(8).
2) /etc/opiekeys
   This file is opened read-write on every login unless OPIE is disabled
   and is updated when any OPIE-enabled user logs in.
3) /etc/resolv.conf
   This is typically updated during DHCP or PPP negotiation.

Is there a good reason why these files can't be moved to (eg) /var/db?

The benefit is that root can more easily be mounted RO if desired.

I don't see any real downsides for the first two:
- Moving dumpdates out of root just means a different FS would need te
  be writable during dumps.
- opiekeys is only useful in multiuser mode (you can't use OPIE in
  single-user mode because root isn't mounted RW) so there's no need
  for it to be on root.

resolv.conf is more problematic:
- Potentially, it could be needed to NFS mount /var, though this seems
  unlikely in practice.
- Since there are no standard APIs for updating resolv.conf, there are
  likely to be lots of home-grown scripts that know where it is.

Would it be worthwhile moving these files?

--=20
Peter Jeremy

--U+BazGySraz5kW0T
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iEYEARECAAYFAk5dz5EACgkQ/opHv/APuIeHlACfex2Bnm8kiGuWTXgzkcLzkXfS
JS4AnjQPrmC7N0FyjuzHdQQW8UfPpZED
=GQWv
-----END PGP SIGNATURE-----

--U+BazGySraz5kW0T--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110831060713.GB37259>