Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Nov 2015 16:32:01 +0700
From:      Eugene Grosbein <eugen@grosbein.net>
To:        "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org>
Subject:   /etc/rc.initdiskless support for small systems
Message-ID:  <56372D91.8040902@grosbein.net>

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

Sometimes it is suitable to use stock /etc/rc.initdiskless to manage boot-time configuration
of embedded systems. Sadly, rc.initdislkess assumes there is distinct file system
keeping persitent local configuration (startup config). Small systems like MIPS routers
may have no enough flash space for full-blown fs.

I've patched rc.initdiskless to run auxiliary command at boot time to extract
startup configuration from such small local storage, f.e. from /dev/map/cfg
I've just submited the patch with PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204215
This way, one can use /conf/default/etc/extract command doing something like:

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

/etc/rc.initdiskless runs such command passing /etc as $1 at boot time then.



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