diff options
Diffstat (limited to 'ezjail-admin')
-rwxr-xr-x | ezjail-admin | 23 |
1 files 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) | |||
113 | echo export jail_${newjail_nname}_procfs_enable=\"${ezjail_procfs_enable}\" >> ${ezjail_jailcfgs}/${newjail_nname} | 113 | echo export jail_${newjail_nname}_procfs_enable=\"${ezjail_procfs_enable}\" >> ${ezjail_jailcfgs}/${newjail_nname} |
114 | echo export jail_${newjail_nname}_fdescfs_enable=\"${ezjail_fdescfs_enable}\" >> ${ezjail_jailcfgs}/${newjail_nname} | 114 | echo export jail_${newjail_nname}_fdescfs_enable=\"${ezjail_fdescfs_enable}\" >> ${ezjail_jailcfgs}/${newjail_nname} |
115 | 115 | ||
116 | # Final steps for flavour installation | ||
117 | if [ "${newjail_flavour}" ]; then | ||
118 | # install files, packages and config to new jail | ||
119 | # user creating, chown and package installation on jails startup | ||
120 | cd ${ezjail_flavours}/${newjail_flavour} | ||
121 | find * | cpio -p -v ${newjail_root} > /dev/null | ||
122 | |||
123 | install -o root -g wheel -m 0755 ${ezjail_share}/ezjail-config.sh ${newjail_root}/etc/rc.d/ezjail-config.sh | ||
124 | echo "Note: Shell scripts installed, flavourizing on jails first startup" | ||
125 | fi | ||
126 | |||
116 | # check, whether IP is configured on a local interface, warn if it isnt | 127 | # check, whether IP is configured on a local interface, warn if it isnt |
117 | ping -c 1 -m 1 -t 1 -q $newjail_ip > /dev/null | 128 | ping -c 1 -m 1 -t 1 -q $newjail_ip > /dev/null |
118 | [ $? = 0 ] || echo "Warning: IP $newjail_ip not configured on a local interface" | 129 | [ $? = 0 ] || echo "Warning: IP $newjail_ip not configured on a local interface" |
@@ -135,17 +146,6 @@ create) | |||
135 | fi | 146 | fi |
136 | IFS=$TIFS | 147 | IFS=$TIFS |
137 | 148 | ||
138 | # Final steps for flavour installation | ||
139 | if [ "${newjail_flavour}" ]; then | ||
140 | # install files, packages and config to new jail | ||
141 | # user creating, chown and package installation on jails startup | ||
142 | cd ${ezjail_jaildir}/${newjail_flavour} | ||
143 | find * | cpio -p -v ${newjail_root} > /dev/null | ||
144 | |||
145 | install -o root -g wheel -m 0755 ${ezjail_share}/ezjail-config.sh ${newjail_root}/etc/rc.d/ezjail-config.sh | ||
146 | echo "Note: Shell scripts installed, flavourizing on jails first startup" | ||
147 | fi | ||
148 | |||
149 | ;; | 149 | ;; |
150 | ######################## ezjail-admin DELETE ######################## | 150 | ######################## ezjail-admin DELETE ######################## |
151 | delete) | 151 | delete) |
@@ -257,6 +257,7 @@ setup|update) | |||
257 | ln -s /basejail/usr/ports usr/ports | 257 | ln -s /basejail/usr/ports usr/ports |
258 | 258 | ||
259 | if [ -d ${ezjail_jailtemplate} ]; then | 259 | if [ -d ${ezjail_jailtemplate} ]; then |
260 | chflags -R noschg ${ezjail_jailtemplate}_old | ||
260 | rm -rf ${ezjail_jailtemplate}_old | 261 | rm -rf ${ezjail_jailtemplate}_old |
261 | mv ${ezjail_jailtemplate} ${ezjail_jailtemplate}_old | 262 | mv ${ezjail_jailtemplate} ${ezjail_jailtemplate}_old |
262 | fi | 263 | fi |