]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r339465: rc.initdiskless: add support for auxiliary NVRAM.
authorEugene Grosbein <eugen@FreeBSD.org>
Mon, 19 Nov 2018 06:33:38 +0000 (06:33 +0000)
committerEugene Grosbein <eugen@FreeBSD.org>
Mon, 19 Nov 2018 06:33:38 +0000 (06:33 +0000)
commit176e2e536b4ecb87138415cf0e88eca1c9c850e1
tree14d997eeb1823735150a25157091781e72226e4b
parent1c2404b7eb694d67af9fe302171aa0afcc167802
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
libexec/rc/rc.initdiskless