Warnings must be emitted last, chflags must be applied to non-shared directories as well
This commit is contained in:
parent
3fe6f11868
commit
bff8fdd86b
23
ezjail-admin
23
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}_procfs_enable=\"${ezjail_procfs_enable}\" >> ${ezjail_jailcfgs}/${newjail_nname}
|
||||||
echo export jail_${newjail_nname}_fdescfs_enable=\"${ezjail_fdescfs_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
|
# 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
|
ping -c 1 -m 1 -t 1 -q $newjail_ip > /dev/null
|
||||||
[ $? = 0 ] || echo "Warning: IP $newjail_ip not configured on a local interface"
|
[ $? = 0 ] || echo "Warning: IP $newjail_ip not configured on a local interface"
|
||||||
@ -135,17 +146,6 @@ create)
|
|||||||
fi
|
fi
|
||||||
IFS=$TIFS
|
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 ########################
|
######################## ezjail-admin DELETE ########################
|
||||||
delete)
|
delete)
|
||||||
@ -257,6 +257,7 @@ setup|update)
|
|||||||
ln -s /basejail/usr/ports usr/ports
|
ln -s /basejail/usr/ports usr/ports
|
||||||
|
|
||||||
if [ -d ${ezjail_jailtemplate} ]; then
|
if [ -d ${ezjail_jailtemplate} ]; then
|
||||||
|
chflags -R noschg ${ezjail_jailtemplate}_old
|
||||||
rm -rf ${ezjail_jailtemplate}_old
|
rm -rf ${ezjail_jailtemplate}_old
|
||||||
mv ${ezjail_jailtemplate} ${ezjail_jailtemplate}_old
|
mv ${ezjail_jailtemplate} ${ezjail_jailtemplate}_old
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user