aboutsummaryrefslogtreecommitdiffstats
path: root/config/jail_template
diff options
context:
space:
mode:
authorEirik Oeverby <ltning@anduin.net>2009-03-14 00:27:08 +0100
committerEirik Oeverby <ltning@anduin.net>2009-03-14 00:27:08 +0100
commitf9a5fbfa1079f9a8dcfdfe4ad1bd50c1317ec8ac (patch)
tree406f5d5a94b035ff18efbc398c562dd8924ce388 /config/jail_template
parent662b06322bd35b323b9f1fb528abaa4a424515d1 (diff)
downloadpfsense-packages-f9a5fbfa1079f9a8dcfdfe4ad1bd50c1317ec8ac.tar.gz
pfsense-packages-f9a5fbfa1079f9a8dcfdfe4ad1bd50c1317ec8ac.tar.bz2
pfsense-packages-f9a5fbfa1079f9a8dcfdfe4ad1bd50c1317ec8ac.zip
Added pfJailctl and jail_template packages
See http://doc.pfsense.org/index.php/PfJailctl_package for details.
Diffstat (limited to 'config/jail_template')
-rw-r--r--config/jail_template/jail_template.img.uzipbin0 -> 63200768 bytes
-rw-r--r--config/jail_template/jail_template.inc32
2 files changed, 32 insertions, 0 deletions
diff --git a/config/jail_template/jail_template.img.uzip b/config/jail_template/jail_template.img.uzip
new file mode 100644
index 00000000..1c92fb90
--- /dev/null
+++ b/config/jail_template/jail_template.img.uzip
Binary files differ
diff --git a/config/jail_template/jail_template.inc b/config/jail_template/jail_template.inc
new file mode 100644
index 00000000..f9c00b79
--- /dev/null
+++ b/config/jail_template/jail_template.inc
@@ -0,0 +1,32 @@
+<?php
+function jail_template_install() {
+ exec('mkdir /usr/jail_template');
+ ## exec('tar -C /usr/jail_template -yxf /tmp/jail_template.tar.bz2 2&gt;&amp;1 &amp;');
+ $_rcfile['file']='000.jail_template.sh';
+ $_rcfile['start']='';
+ $_rcfile['stop']='';
+ $_rcfile['start'].='mount -o ro /dev/`mdconfig -af /usr/jail_template.img.uzip`.uzip /usr/jail_template '."\n\t";
+ $_rcfile['stop'].='umount -f /usr/jail_template '."\n\t";
+ $_rcfile['stop'].='mdconfig -d -u `expr "$(mdconfig -l -v | grep jail_template | grep -v grep)" : "md\([0-9]*\)"` '."\n\t";
+ write_rcfile($_rcfile);
+ exec('mount -o ro /dev/`mdconfig -af /usr/jail_template.img.uzip`.uzip /usr/jail_template');
+
+ $GLOBALS['config']['installedpackages']['pfjailctltemplates']['config'][0]['templates']['jail_template']['name']=
+ 'pfSense default jail template';
+ $GLOBALS['config']['installedpackages']['pfjailctltemplates']['config'][0]['templates']['jail_template']['path']=
+ '/usr/jail_template';
+}
+
+function jail_template_deinstall() {
+ exec('umount -f /usr/jail_template');
+ exec('mdconfig -d -u `expr "$(mdconfig -l -v | grep jail_template | grep -v grep)" : "md\([0-9]*\)');
+ unset($GLOBALS['config']['installedpackages']['pfjailctltemplates']['config'][0]['templates']['jail_template']);
+}
+
+function jail_template_resync() {
+ $GLOBALS['config']['installedpackages']['pfjailctltemplates']['config'][0]['templates']['jail_template']['name']=
+ 'pfSense default jail template';
+ $GLOBALS['config']['installedpackages']['pfjailctltemplates']['config'][0]['templates']['jail_template']['path']=
+ '/usr/jail_template';
+}
+?> \ No newline at end of file