Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Aug 2020 04:36:20 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 248865] rc script in /usr/local/etc/rc.d/ may be ignored
Message-ID:  <bug-248865-227-a9GTMBKtsf@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-248865-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-248865-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D248865

--- Comment #1 from unitrunker@gmail.com ---
To reproduce, paste the following into a file named /usr/local/etc/rc.d/pla=
cebo

------------>8 snip 8<---------
#!/bin/sh

. /etc/rc.subr

name=3Dplacebo
rcvar=3Dplacebo_enable
start_cmd=3D"${name}_start"
stop_cmd=3D"${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=3D"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.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-248865-227-a9GTMBKtsf>