mfsbsd icon indicating copy to clipboard operation
mfsbsd copied to clipboard

installed package's rc scripts don't get run

Open lehenbauer opened this issue 13 years ago • 2 comments

Hi Martin,

If one of the optional packages put in the packages directory installs a startup script into /usr/local/etc/rc.d then it doesn't get run at mfsbsd boot time because rcorder runs before the rc.d/package script gets to mount /usr/local and install the packages.

A semi-decent workaround is to have another file in scripts called something like localpackages that runs near the end of the rc.d scripts and runs the stuff in /usr/local/etc/rc.d. It may not be quite right in the handling if it should honor the .sh thing for not running in a subshell. Maybe there's a shell function for that, I'm not super expert on FreeBSD initialization.

!/bin/sh

$Id$

PROVIDE: localpackages

REQUIRE: LOGIN

KEYWORD: FreeBSD

. /etc/rc.subr

name="localpackages" start_cmd="localpackages_start" stop_cmd=":"

localpackages_start() { for file in /usr/local/etc/rc.d/* do echo $file start sh $file start done }

load_rc_config $name run_rc_command "$1" adsb (master) scripts $

lehenbauer avatar Aug 22 '11 06:08 lehenbauer

Yes, I will look at this when I have some more time.

mmatuska avatar Nov 08 '11 13:11 mmatuska

btw. this should work in ROOTHACK mode

mmatuska avatar Apr 17 '13 07:04 mmatuska