]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r339465: rc.initdiskless: add support for auxiliary NVRAM.
authoreugen <eugen@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 19 Nov 2018 06:39:00 +0000 (06:39 +0000)
committereugen <eugen@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 19 Nov 2018 06:39:00 +0000 (06:39 +0000)
commit1ab14cd9a6cd992dc97983e4130afe0271b31f83
tree6f3e504ad67307f2b0034ba4e8e8d25f6f6577d7
parent6f45b2154797cf353a3d2b0eae3f668a676287d8
MFC r339465: rc.initdiskless: add support for auxiliary NVRAM.

  Currently, rc.inidiskless assumes that local system configuration
  changes are kept in some mountable file system. For example,
  nanobsd uses dedicated partition mounted as /cfg for this.

  However, small embedded devices like MIPS routers may have no enough flash
  space to keep full-blown file system but have only one or couple
  small flash blocks to keep persistent local configuration overrides.

  This change extends rc.initdiskless and introduces ability to run auxiliary
  command /conf/T/M/extract that is supposed to extract configuration overrides
  from such local storage.

  For example, the command /conf/default/etc/extract may contain something like:

  cd "$1" && bsdcpio --quiet -idu < /dev/map/cfg

  bsdcpio command extracts compressed archive from the storage to /etc
  assuming the storage is exposed by the kernel as /dev/map/cfg to userland.

PR: 204215

git-svn-id: svn://svn.freebsd.org/base/stable/10@340612 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
etc/rc.initdiskless