aboutsummaryrefslogtreecommitdiffstats
path: root/audio/autocd/files/autocd.sh
blob: 152cc13cfde4160c97d56cb6ea53eca2e393b4b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: autocd
# REQUIRE:
# BEFORE:
# KEYWORD: shutdown

#
# Add the following lines to /etc/rc.conf to enable autocd:
#
#autocd_enable="YES"
#
# See autocd(8) for flags
#

. %%RC_SUBR%%

name=autocd
rcvar=`set_rcvar`

command=%%PREFIX%%/sbin/autocd

stop_cmd=stop_cmd

stop_cmd()
{
  %%PREFIX%%/bin/cdctl die
}

# set defaults
autocd_enable=${autocd_enable:-"NO"}
autocd_flags=${autocd_flags:-""}

load_rc_config $name
run_rc_command "$1"