Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installed package's rc scripts don't get run #1

Open
lehenbauer opened this issue Aug 22, 2011 · 2 comments
Open

installed package's rc scripts don't get run #1

lehenbauer opened this issue Aug 22, 2011 · 2 comments

Comments

@lehenbauer
Copy link

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 $

@mmatuska
Copy link
Owner

mmatuska commented Nov 8, 2011

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

@mmatuska
Copy link
Owner

btw. this should work in ROOTHACK mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants