summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2005-09-26 01:30:00 +0000
committererdgeist <erdgeist@erdgeist.org>2005-09-26 01:30:00 +0000
commit42245e938bfeb958534f68bbc528324fc8339eea (patch)
tree664719892ba856ea31a94b6fd7c5ddc428f5664c
parent8315db1efabde7d1b840905a2c89e67e01ff7ca8 (diff)
ezjail now is called ezjail.sh
-rwxr-xr-xMakefile4
-rwxr-xr-xezjail.sh53
-rwxr-xr-xman1/ezjail-admin.12
-rwxr-xr-xman5/ezjail.54
-rwxr-xr-xman5/ezjail.conf.52
5 files changed, 59 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 6fbe633..37fe5cc 100755
--- a/Makefile
+++ b/Makefile
@@ -3,10 +3,10 @@ all:
3install: 3install:
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
14ezjail_prefix=EZJAIL_PREFIX
15
16. /etc/rc.subr
17
18name=ezjail
19rcvar=`set_rcvar`
20load_rc_config $name
21
22ezjail_enable=${ezjail_enable:-"NO"}
23
24restart_cmd="do_restart"
25start_cmd="do_start"
26stop_cmd="do_stop"
27
28do_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
36do_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
45do_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
53run_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
93EZJAIL_PREFIX/etc/ezjail.conf 93EZJAIL_PREFIX/etc/ezjail.conf
94.br 94.br
95EZJAIL_PREFIX/etc/rc.d/ezjail 95EZJAIL_PREFIX/etc/rc.d/ezjail.sh
96.SH "SEE ALSO" 96.SH "SEE ALSO"
97ezjail(5), ezjail.conf(5), jail(8), devfs(5), fdescfs(5), procfs(5) 97ezjail(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
3ezjail \- A simple jail setup framework 3ezjail \- A simple jail setup framework
4.SH SYNOPSIS 4.SH SYNOPSIS
5EZJAIL_PREFIX/etc/rc.d/ezjail 5EZJAIL_PREFIX/etc/rc.d/ezjail.sh
6.SH DESCRIPTION 6.SH DESCRIPTION
7The ezjail framework provides a simple way to create many virtual FreeBSD 7The ezjail framework provides a simple way to create many virtual FreeBSD
8servers by using FreeBSD's jail system. It requires little administration 8servers by using FreeBSD's jail system. It requires little administration
@@ -37,7 +37,7 @@ config file.
37.SH FILES 37.SH FILES
38EZJAIL_PREFIX/etc/ezjail.conf 38EZJAIL_PREFIX/etc/ezjail.conf
39.br 39.br
40EZJAIL_PREFIX/etc/rc.d/ezjail 40EZJAIL_PREFIX/etc/rc.d/ezjail.sh
41.SH "SEE ALSO" 41.SH "SEE ALSO"
42ezjail-admin(1), ezjail.conf(5), jail(8), mount_nullfs(8) 42ezjail-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
90EZJAIL_PREFIX/etc/ezjail.conf 90EZJAIL_PREFIX/etc/ezjail.conf
91.br 91.br
92EZJAIL_PREFIX/etc/rc.d/ezjail 92EZJAIL_PREFIX/etc/rc.d/ezjail.sh
93.SH "SEE ALSO" 93.SH "SEE ALSO"
94ezjail-admin(1), ezjail(5), jail(8), devfs(5), fdescfs(5), procfs(5) 94ezjail-admin(1), ezjail(5), jail(8), devfs(5), fdescfs(5), procfs(5)
95.SH AUTHOR 95.SH AUTHOR