diff options
author | erdgeist <erdgeist@erdgeist.org> | 2005-09-26 01:30:00 +0000 |
---|---|---|
committer | erdgeist <erdgeist@erdgeist.org> | 2005-09-26 01:30:00 +0000 |
commit | 42245e938bfeb958534f68bbc528324fc8339eea (patch) | |
tree | 664719892ba856ea31a94b6fd7c5ddc428f5664c | |
parent | 8315db1efabde7d1b840905a2c89e67e01ff7ca8 (diff) |
ezjail now is called ezjail.sh
-rwxr-xr-x | Makefile | 4 | ||||
-rwxr-xr-x | ezjail.sh | 53 | ||||
-rwxr-xr-x | man1/ezjail-admin.1 | 2 | ||||
-rwxr-xr-x | man5/ezjail.5 | 4 | ||||
-rwxr-xr-x | man5/ezjail.conf.5 | 2 |
5 files changed, 59 insertions, 6 deletions
@@ -3,10 +3,10 @@ all: | |||
3 | install: | 3 | install: |
4 | mkdir -p ${PREFIX}/etc/ezjail/ ${PREFIX}/man/man1 ${PREFIX}/man/man5 | 4 | mkdir -p ${PREFIX}/etc/ezjail/ ${PREFIX}/man/man1 ${PREFIX}/man/man5 |
5 | cp -p ezjail.conf.sample ${PREFIX}/etc/ | 5 | cp -p ezjail.conf.sample ${PREFIX}/etc/ |
6 | sed s:EZJAIL_PREFIX:${PREFIX}: ezjail > ${PREFIX}/etc/rc.d/ezjail | 6 | sed s:EZJAIL_PREFIX:${PREFIX}: ezjail.sh > ${PREFIX}/etc/rc.d/ezjail.sh |
7 | sed s:EZJAIL_PREFIX:${PREFIX}: ezjail-admin > ${PREFIX}/bin/ezjail-admin | 7 | sed s:EZJAIL_PREFIX:${PREFIX}: ezjail-admin > ${PREFIX}/bin/ezjail-admin |
8 | sed s:EZJAIL_PREFIX:${PREFIX}: man1/ezjail-admin.1 > ${PREFIX}/man/man1/ezjail-admin.1 | 8 | sed s:EZJAIL_PREFIX:${PREFIX}: man1/ezjail-admin.1 > ${PREFIX}/man/man1/ezjail-admin.1 |
9 | sed s:EZJAIL_PREFIX:${PREFIX}: man5/ezjail.conf.5 > ${PREFIX}/man/man5/ezjail.conf.5 | 9 | sed s:EZJAIL_PREFIX:${PREFIX}: man5/ezjail.conf.5 > ${PREFIX}/man/man5/ezjail.conf.5 |
10 | sed s:EZJAIL_PREFIX:${PREFIX}: man5/ezjail.5 > ${PREFIX}/man/man5/ezjail.5 | 10 | sed s:EZJAIL_PREFIX:${PREFIX}: man5/ezjail.5 > ${PREFIX}/man/man5/ezjail.5 |
11 | chmod 755 ${PREFIX}/etc/rc.d/ezjail ${PREFIX}/bin/ezjail-admin | 11 | chmod 755 ${PREFIX}/etc/rc.d/ezjail.sh ${PREFIX}/bin/ezjail-admin |
12 | chown root:wheel ${PREFIX}/man/man1/ezjail-admin.1 ${PREFIX}/man/man5/ezjail.conf.5 ${PREFIX}/man/man5/ezjail.5 | 12 | chown root:wheel ${PREFIX}/man/man1/ezjail-admin.1 ${PREFIX}/man/man5/ezjail.conf.5 ${PREFIX}/man/man5/ezjail.5 |
diff --git a/ezjail.sh b/ezjail.sh new file mode 100755 index 0000000..9e59dc2 --- /dev/null +++ b/ezjail.sh | |||
@@ -0,0 +1,53 @@ | |||
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 /~. ___` || echo " ezjail" | ||
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 /~. ___` || echo " ezjail" | ||
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 $* | ||
diff --git a/man1/ezjail-admin.1 b/man1/ezjail-admin.1 index c2b1263..11298c2 100755 --- a/man1/ezjail-admin.1 +++ b/man1/ezjail-admin.1 | |||
@@ -92,7 +92,7 @@ is considered a good idea. | |||
92 | .T4 | 92 | .T4 |
93 | EZJAIL_PREFIX/etc/ezjail.conf | 93 | EZJAIL_PREFIX/etc/ezjail.conf |
94 | .br | 94 | .br |
95 | EZJAIL_PREFIX/etc/rc.d/ezjail | 95 | EZJAIL_PREFIX/etc/rc.d/ezjail.sh |
96 | .SH "SEE ALSO" | 96 | .SH "SEE ALSO" |
97 | ezjail(5), ezjail.conf(5), jail(8), devfs(5), fdescfs(5), procfs(5) | 97 | ezjail(5), ezjail.conf(5), jail(8), devfs(5), fdescfs(5), procfs(5) |
98 | .SH AUTHOR | 98 | .SH AUTHOR |
diff --git a/man5/ezjail.5 b/man5/ezjail.5 index 5ead85a..77725e8 100755 --- a/man5/ezjail.5 +++ b/man5/ezjail.5 | |||
@@ -2,7 +2,7 @@ | |||
2 | .SH NAME | 2 | .SH NAME |
3 | ezjail \- A simple jail setup framework | 3 | ezjail \- A simple jail setup framework |
4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
5 | EZJAIL_PREFIX/etc/rc.d/ezjail | 5 | EZJAIL_PREFIX/etc/rc.d/ezjail.sh |
6 | .SH DESCRIPTION | 6 | .SH DESCRIPTION |
7 | The ezjail framework provides a simple way to create many virtual FreeBSD | 7 | The ezjail framework provides a simple way to create many virtual FreeBSD |
8 | servers by using FreeBSD's jail system. It requires little administration | 8 | servers by using FreeBSD's jail system. It requires little administration |
@@ -37,7 +37,7 @@ config file. | |||
37 | .SH FILES | 37 | .SH FILES |
38 | EZJAIL_PREFIX/etc/ezjail.conf | 38 | EZJAIL_PREFIX/etc/ezjail.conf |
39 | .br | 39 | .br |
40 | EZJAIL_PREFIX/etc/rc.d/ezjail | 40 | EZJAIL_PREFIX/etc/rc.d/ezjail.sh |
41 | .SH "SEE ALSO" | 41 | .SH "SEE ALSO" |
42 | ezjail-admin(1), ezjail.conf(5), jail(8), mount_nullfs(8) | 42 | ezjail-admin(1), ezjail.conf(5), jail(8), mount_nullfs(8) |
43 | .SH AUTHOR | 43 | .SH AUTHOR |
diff --git a/man5/ezjail.conf.5 b/man5/ezjail.conf.5 index 529c4a3..b1ae6e1 100755 --- a/man5/ezjail.conf.5 +++ b/man5/ezjail.conf.5 | |||
@@ -89,7 +89,7 @@ for more information). | |||
89 | .SH FILES | 89 | .SH FILES |
90 | EZJAIL_PREFIX/etc/ezjail.conf | 90 | EZJAIL_PREFIX/etc/ezjail.conf |
91 | .br | 91 | .br |
92 | EZJAIL_PREFIX/etc/rc.d/ezjail | 92 | EZJAIL_PREFIX/etc/rc.d/ezjail.sh |
93 | .SH "SEE ALSO" | 93 | .SH "SEE ALSO" |
94 | ezjail-admin(1), ezjail(5), jail(8), devfs(5), fdescfs(5), procfs(5) | 94 | ezjail-admin(1), ezjail(5), jail(8), devfs(5), fdescfs(5), procfs(5) |
95 | .SH AUTHOR | 95 | .SH AUTHOR |