[Bug 248865] rc script in /usr/local/etc/rc.d/ may be ignored
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Aug 24 04:36:20 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248865
--- Comment #1 from unitrunker at gmail.com ---
To reproduce, paste the following into a file named /usr/local/etc/rc.d/placebo
------------>8 snip 8<---------
#!/bin/sh
. /etc/rc.subr
name=placebo
rcvar=placebo_enable
start_cmd="${name}_start"
stop_cmd="${name}_stop"
placebo_start()
{
sleep 5
}
placebo_stop()
{
sleep 5
}
load_rc_config $name
run_rc_command "$1"
------------>8 snip 8<---------
Enable the service in /etc/rc.conf ...
# sysrc placebo="YES"
Verify the service runs ...
# service placebo start
# service placebo stop
... now reboot.
# reboot
The above service is NOT run by /etc/rc because it does not contain a '#
PROVIDE: ' clause.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list