summaryrefslogtreecommitdiff
path: root/ezjail-config.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ezjail-config.sh')
-rw-r--r--ezjail-config.sh22
1 files changed, 11 insertions, 11 deletions
diff --git a/ezjail-config.sh b/ezjail-config.sh
index a84407c..fa02423 100644
--- a/ezjail-config.sh
+++ b/ezjail-config.sh
@@ -2,21 +2,21 @@
2# 2#
3# BEFORE: rcconf 3# BEFORE: rcconf
4 4
5if [ -f /etc/ezjail.template ]; then 5if [ -f /etc/ezjail.flavour ]; then
6 . /etc/ezjail.template 6 . /etc/ezjail.flavour
7 7
8 # we do need to install only once 8 # we do need to install only once
9 # rm -f /etc/ezjail.template 9 # rm -f /etc/ezjail.flavour
10fi 10fi
11 11
12# set defaults 12# set defaults
13ezjail_template_root=${ezjail_template_root:-"/basejail/config/default"} 13ezjail_flavour_root=${ezjail_flavour_root:-"/basejail/config/default"}
14ezjail_template_files=${ezjail_template_files:-""} 14ezjail_flavour_files=${ezjail_flavour_files:-""}
15ezjail_template_users=${ezjail_template_users:-""} 15ezjail_flavour_users=${ezjail_flavour_users:-""}
16ezjail_template_packages=${ezjail_template_packages:-""} 16ezjail_flavour_packages=${ezjail_flavour_packages:-""}
17 17
18# try to create users 18# try to create users
19for user in $ezjail_template_users; do 19for user in $ezjail_flavour_users; do
20 TIFS=$IFS; IFS=:; set -- $user; IFS=$TIFS 20 TIFS=$IFS; IFS=:; set -- $user; IFS=$TIFS
21 21
22 if [ $# -eq 8 ]; then 22 if [ $# -eq 8 ]; then
@@ -45,8 +45,8 @@ for user in $ezjail_template_users; do
45done 45done
46 46
47# try to install files 47# try to install files
48cd $ezjail_template_root 48cd $ezjail_flavour_root
49for file in $ezjail_template_files; do 49for file in $ezjail_flavour_files; do
50 TIFS=$IFS; IFS=:; set -- $file; IFS=$TIFS 50 TIFS=$IFS; IFS=:; set -- $file; IFS=$TIFS
51 51
52 if [ $# -eq 3 -a "$3" ]; then 52 if [ $# -eq 3 -a "$3" ]; then
@@ -60,7 +60,7 @@ done
60 60
61# finally install packages 61# finally install packages
62[ -d /basejail/config/pkg ] && cd /basejail/config/pkg 62[ -d /basejail/config/pkg ] && cd /basejail/config/pkg
63[ $ezjail_template_packages ] && pkg_add $ezjail_template_packages 63[ $ezjail_flavour_packages ] && pkg_add $ezjail_flavour_packages
64 64
65# Get rid off ourself 65# Get rid off ourself
66rm -f /etc/rc.d/ezjail-config.sh 66rm -f /etc/rc.d/ezjail-config.sh