From bff8fdd86b6819ac31c2d914ce91dc071534405e Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sat, 31 Dec 2005 16:40:36 +0000 Subject: Warnings must be emitted last, chflags must be applied to non-shared directories as well --- ezjail-admin | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/ezjail-admin b/ezjail-admin index c8efc63..1a5c535 100755 --- a/ezjail-admin +++ b/ezjail-admin @@ -113,6 +113,17 @@ create) echo export jail_${newjail_nname}_procfs_enable=\"${ezjail_procfs_enable}\" >> ${ezjail_jailcfgs}/${newjail_nname} echo export jail_${newjail_nname}_fdescfs_enable=\"${ezjail_fdescfs_enable}\" >> ${ezjail_jailcfgs}/${newjail_nname} + # Final steps for flavour installation + if [ "${newjail_flavour}" ]; then + # install files, packages and config to new jail + # user creating, chown and package installation on jails startup + cd ${ezjail_flavours}/${newjail_flavour} + find * | cpio -p -v ${newjail_root} > /dev/null + + install -o root -g wheel -m 0755 ${ezjail_share}/ezjail-config.sh ${newjail_root}/etc/rc.d/ezjail-config.sh + echo "Note: Shell scripts installed, flavourizing on jails first startup" + fi + # check, whether IP is configured on a local interface, warn if it isnt ping -c 1 -m 1 -t 1 -q $newjail_ip > /dev/null [ $? = 0 ] || echo "Warning: IP $newjail_ip not configured on a local interface" @@ -135,17 +146,6 @@ create) fi IFS=$TIFS - # Final steps for flavour installation - if [ "${newjail_flavour}" ]; then - # install files, packages and config to new jail - # user creating, chown and package installation on jails startup - cd ${ezjail_jaildir}/${newjail_flavour} - find * | cpio -p -v ${newjail_root} > /dev/null - - install -o root -g wheel -m 0755 ${ezjail_share}/ezjail-config.sh ${newjail_root}/etc/rc.d/ezjail-config.sh - echo "Note: Shell scripts installed, flavourizing on jails first startup" - fi - ;; ######################## ezjail-admin DELETE ######################## delete) @@ -257,6 +257,7 @@ setup|update) ln -s /basejail/usr/ports usr/ports if [ -d ${ezjail_jailtemplate} ]; then + chflags -R noschg ${ezjail_jailtemplate}_old rm -rf ${ezjail_jailtemplate}_old mv ${ezjail_jailtemplate} ${ezjail_jailtemplate}_old fi -- cgit v1.2.3