Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1172 | dev | 1 | #!/bin/sh |
2 | |||
3 | # PROVIDE: rebootd |
||
4 | # REQUIRE: NETWORKING SERVERS |
||
5 | # KEYWORD: FreeBSD shutdown |
||
6 | |||
7 | # |
||
8 | # Add the following lines to /etc/rc.conf to enable rebootd: |
||
9 | # rebootd_enable (bool): Set to "NO" by default. |
||
10 | # Set it to "YES" to enable rebootd |
||
11 | # rebootd_flags (str): Any arguments |
||
12 | # |
||
13 | |||
14 | . /etc/rc.subr |
||
15 | |||
16 | name="rebootd" |
||
17 | rcvar=`set_rcvar` |
||
18 | |||
19 | command="/usr/opt/sbin/rebootd" |
||
20 | pidfile="/var/run/rebootd.pid" |
||
21 | |||
22 | [ -z "${rebootd_enable}" ] && rebootd_enable="NO" |
||
23 | [ -z "${rebootd_flags}" ] && rebootd_flags="" |
||
24 | [ -z "${rebootd_configfile}" ] && rebootd_configfile="/usr/local/etc/rebootd.conf" |
||
25 | |||
26 | rebootd_flags="--config ${rebootd_configfile} ${rebootd_flags}" |
||
27 | required_files=${rebootd_configfile} |
||
28 | |||
29 | load_rc_config $name |
||
30 | |||
31 | extra_commands="reload" |
||
32 | run_rc_command "$1" |