Clean up the rc.d script as suggested by dougb
Submitted by: dougb via e-mail Approved by: maintainer (implicit), araujo (mentor)
This commit is contained in:
parent
56fbba99aa
commit
24785674ce
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=218142
1 changed files with 8 additions and 10 deletions
|
@ -4,35 +4,33 @@
|
|||
#
|
||||
|
||||
# PROVIDE: autocd
|
||||
# REQUIRE:
|
||||
# BEFORE:
|
||||
# REQUIRE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf to enable autocd:
|
||||
#
|
||||
#autocd_enable="YES"
|
||||
# autocd_enable="YES"
|
||||
#
|
||||
# See autocd(8) for flags
|
||||
# See autocd(8) for relevant values for autocd_flags
|
||||
#
|
||||
|
||||
. %%RC_SUBR%%
|
||||
|
||||
name=autocd
|
||||
rcvar=`set_rcvar`
|
||||
rcvar=${name}_enable
|
||||
|
||||
command=%%PREFIX%%/sbin/autocd
|
||||
|
||||
stop_cmd=stop_cmd
|
||||
stop_cmd=${name}_stop
|
||||
|
||||
stop_cmd()
|
||||
autocd_stop ()
|
||||
{
|
||||
%%PREFIX%%/bin/cdctl die
|
||||
%%PREFIX%%/bin/cdctl die
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
# set defaults
|
||||
autocd_flags=${autocd_flags-""}
|
||||
autocd_enable=${autocd_enable-NO}
|
||||
|
||||
run_rc_command "$1"
|
||||
|
|
Loading…
Reference in a new issue