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