I'm working on a small footprint semi-embedded system, I need a means to load and save parts of /var (which is a memory-backed filesystem) at boot and shutdown. Given that rc.local is now deprecated, what is the "correct" way to perform extra startup/shutdown processes, should I write an rc.d script for it and insert it into the rcorder appropriately, or is there another mechanism? Thanks in advance Morgan
Morgan Reed wrote:> I'm working on a small footprint semi-embedded system, I need a means > to load and save parts of /var (which is a memory-backed filesystem) > at boot and shutdown. > > Given that rc.local is now deprecated, what is the "correct" way to > perform extra startup/shutdown processes, should I write an rc.d > script for it and insert it into the rcorder appropriately, or is > there another mechanism? > > Thanks in advance > > MorganI'm also doing embedded system work on a PC Engines WRAP platform with a CF-based disk, and I'm using custom rc.d scripts for this purpose. Mainly little scripts to enable specific LEDs at the end of the boot process and to copy misc. read-only files from the CF into a memory filesystem during boot. Works rather well, and the documentation in /usr/share/doc/en/articles/rc-scripting was a big help in this regard. -Proto
Morgan Reed wrote:> Given that rc.local is now deprecated,Where did you get that idea? -- This .signature sanitized for your protection
Doug Barton wrote:> Morgan Reed wrote: > > >> Given that rc.local is now deprecated, >> > > Where did you get that idea? > >man rc.local on a freebsd 7 box says The rc utility is the command script which controls the automatic boot process after being called by init(8). The rc.local script contains com- mands which are pertinent only to a specific site. Typically, the /usr/local/etc/rc.d/ mechanism is used instead of rc.local these days but if you want to use rc.local, it is still supported. In this case, it should source /etc/rc.conf and contain additional custom startup code for your system. The best way to handle rc.local, however, is to separate it out into rc.d/ style scripts and place them under /usr/local/etc/rc.d/. The rc.conf file contains the global system configuration information referenced by the startup scripts, while rc.conf.local contains the local system configuration. See rc.conf(5) for more information. The rc.d/ directories contain scripts which will be automatically exe- cuted at boot time and shutdown time. So, rc.local, though not current is still supported. Brian