Date: Tue, 15 Jan 2013 09:39:30 +0100 From: Nick Hibma <nick@van-laarhoven.org> To: tak.official@gmail.com Cc: freebsd-embedded@freebsd.org Subject: Re: nanobsd boot sequence problem Message-ID: <610E2681-4FA7-466E-9284-A6257424F171@van-laarhoven.org> In-Reply-To: <8B3635F5-ABD9-470B-9F2A-789886B23A08@bsdimp.com> References: <CAPkyVLzu=RVVgJzcszKDAWRq-wBPgZVphC_6UVjzMJPitBaDaA@mail.gmail.com> <8B3635F5-ABD9-470B-9F2A-789886B23A08@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
>> hi everyone, >>=20 >> i'm new in nanobsd field, trying to well-config my first nanobsd = server for >> a while.. >>=20 >> here's my base question: which script is responsible for creating = /etc and >> /var as md drives? >>=20 >> i wanna know this cause early in my startup sequence, i've got a = some-how >> myinit script which is in need of modifying /etc files; but it seems = that >> when myinit script is running, there is no such rw /etc there.. it's >> confusing.. so i thought if i knew the creator script, i can have the = right >> sequence via REQUIRE and BEFORE and alike.. >>=20 >> thank you for all your ideas and tips, and specially, your time :) >=20 > /etc/rc.initdiskless does that, called early from /etc/rc, before the = rc.d scripts. So I'm surprised you are having issues... We use the script below to modify the configuration based on a file = stored on /cfg. It modifies 0 or more files on /etc/ (that includes the symlinked = /usr/local/etc/) before the system starts. Those are the files modified = on the memory disk, not the underlying partition or /conf/etc/ dir. Hope this helps. Nick #!/bin/sh # # PROVIDE: unit_localise # BEFORE: hostid # # This script needs to be run as one of the first ones. It modifies any # configuration files that contain @@AW<id>@@ awparams. It replaces all = those # awparams with the values read in from /etc/unit_localise{.default,}. # # Note: 'hostid' has been chosen as `rcorder /etc/rc.d/* = /usr/local/etc/rc.d/*' # shows that one as the first one. . /etc/rc.subr name=3D'unit_localise' rcvar=3D$(set_rcvar) load_rc_config $name : ${unit_localise_enable:=3D'YES'} unit_localise_start () { ... } start_cmd=3D'unit_localise_start' stop_cmd=3D':' run_rc_command "$1"=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?610E2681-4FA7-466E-9284-A6257424F171>