diff options
Diffstat (limited to 'ezjail-config.sh')
-rw-r--r-- | ezjail-config.sh | 15 |
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 | ||
5 | set -o noglob | 5 | set -o noglob |
6 | if [ -f /etc/ezjail.flavour ]; then | 6 | if [ -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 |
11 | fi | 11 | fi |
12 | 12 | ||
13 | # set defaults | 13 | # set defaults |
14 | ezjail_flavour_root=${ezjail_flavour_root:-"/basejail/config/default"} | ||
15 | ezjail_flavour_files=${ezjail_flavour_files:-""} | 14 | ezjail_flavour_files=${ezjail_flavour_files:-""} |
16 | ezjail_flavour_users=${ezjail_flavour_users:-""} | 15 | ezjail_flavour_users=${ezjail_flavour_users:-""} |
17 | ezjail_flavour_packages=${ezjail_flavour_packages:-""} | ||
18 | 16 | ||
19 | # try to create users | 17 | # try to create users |
20 | for user in $ezjail_flavour_users; do | 18 | for user in $ezjail_flavour_users; do |
@@ -45,7 +43,7 @@ for user in $ezjail_flavour_users; do | |||
45 | done | 43 | done |
46 | 44 | ||
47 | # try to install files | 45 | # try to install files |
48 | cd $ezjail_flavour_root | 46 | cd /config |
49 | for file in $ezjail_flavour_files; do | 47 | for 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 | |||
60 | done | 58 | done |
61 | 59 | ||
62 | # finally install packages | 60 | # finally install packages |
63 | [ -d /basejail/config/pkg ] && cd /basejail/config/pkg | 61 | set -o noglob |
64 | set +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 |
68 | rm -f /etc/rc.d/ezjail-config.sh | 65 | rm -f /etc/rc.d/ezjail-config.sh |