diff options
author | erdgeist <erdgeist@erdgeist.org> | 2005-09-26 01:29:02 +0000 |
---|---|---|
committer | erdgeist <erdgeist@erdgeist.org> | 2005-09-26 01:29:02 +0000 |
commit | 8315db1efabde7d1b840905a2c89e67e01ff7ca8 (patch) | |
tree | 70c69362294e9dc63aeaddc0c962f7ce39311428 | |
parent | 7f70ad4568dab693e26d63879d6b3e7c0ee9d166 (diff) |
rc.d scripts must be named *.sh
-rwxr-xr-x | ezjail | 53 |
1 files changed, 0 insertions, 53 deletions
@@ -1,53 +0,0 @@ | |||
1 | #/bin/sh | ||
2 | |||
3 | # $FreeBSD$ | ||
4 | # | ||
5 | # PROVIDE: ezjail | ||
6 | # | ||
7 | # Note: Add the following lines to $PREFIX/etc/rc.conf to enable ezjail, | ||
8 | # | ||
9 | #ezjail_enable="YES" | ||
10 | # | ||
11 | # Please do not change this file, configure in $PREFIX/etc/ezjail.conf | ||
12 | |||
13 | # ugly: this variable will be set on port install time | ||
14 | ezjail_prefix=EZJAIL_PREFIX | ||
15 | |||
16 | . /etc/rc.subr | ||
17 | |||
18 | name=ezjail | ||
19 | rcvar=`set_rcvar` | ||
20 | load_rc_config $name | ||
21 | |||
22 | ezjail_enable=${ezjail_enable:-"NO"} | ||
23 | |||
24 | restart_cmd="do_restart" | ||
25 | start_cmd="do_start" | ||
26 | stop_cmd="do_stop" | ||
27 | |||
28 | do_start() | ||
29 | { | ||
30 | [ -n "$*" ] && jail_list=`echo $* | tr /~. ___`; | ||
31 | jail_list=${jail_list:-`ls ${ezjail_prefix}/etc/ezjail/`} | ||
32 | for jail in $jail_list; do . ${ezjail_prefix}/etc/ezjail/${jail}; done | ||
33 | sh /etc/rc.d/jail onestart $jail_list | ||
34 | } | ||
35 | |||
36 | do_restart() | ||
37 | { | ||
38 | [ -n "$*" ] && jail_list=`echo $* | tr /~. ___`; | ||
39 | jail_list=${jail_list:-`ls ${ezjail_prefix}/etc/ezjail/`} | ||
40 | for jail in $jail_list; do . ${ezjail_prefix}/etc/ezjail/${jail}; done | ||
41 | sh /etc/rc.d/jail onestop $jail_list | ||
42 | sh /etc/rc.d/jail onestart $jail_list | ||
43 | } | ||
44 | |||
45 | do_stop() | ||
46 | { | ||
47 | [ -n "$*" ] && jail_list=`echo $* | tr /~. ___`; | ||
48 | jail_list=${jail_list:-`ls ${ezjail_prefix}/etc/ezjail/`} | ||
49 | for jail in $jail_list; do . ${ezjail_prefix}/etc/ezjail/${jail}; done | ||
50 | sh /etc/rc.d/jail onestop $jail_list | ||
51 | } | ||
52 | |||
53 | run_rc_command $* | ||