summaryrefslogtreecommitdiff
path: root/ezjail-admin
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2010-01-14 02:11:03 +0000
committererdgeist <erdgeist@erdgeist.org>2010-01-14 02:11:03 +0000
commit02b7620839a428c58924153f8f9fab3cb80b486a (patch)
tree266f35c2666a87eb5626d85b1a0ff799f411dccd /ezjail-admin
parent22aa36af20d28c65abe9c5ef96b45e643c27b19f (diff)
Introduce a default flavour setting, also fix some leftovers from renaming default to example. Many thanks to Panagiotis J. Christias
Diffstat (limited to 'ezjail-admin')
-rwxr-xr-xezjail-admin9
1 files changed, 6 insertions, 3 deletions
diff --git a/ezjail-admin b/ezjail-admin
index 417eb0e..5438a56 100755
--- a/ezjail-admin
+++ b/ezjail-admin
@@ -268,15 +268,15 @@ ezjail_splitworld() {
268 fi 268 fi
269 269
270 # If the default flavour example has not yet been copied, do it now 270 # If the default flavour example has not yet been copied, do it now
271 [ -d "${ezjail_flavours}/default" ] || mkdir -p "${ezjail_flavours}" && cp -p -R "${ezjail_examples}/default" "${ezjail_flavours}" 271 [ -d "${ezjail_flavours}/example" ] || mkdir -p "${ezjail_flavours}" && cp -p -R "${ezjail_examples}/example" "${ezjail_flavours}"
272 272
273 # no /usr/ports? link to /basejail/usr/ports 273 # no /usr/ports? link to /basejail/usr/ports
274 [ -e "${ezjail_jailtemplate}/usr/ports" ] || ln -s /basejail/usr/ports "${ezjail_jailtemplate}/usr/ports" 274 [ -e "${ezjail_jailtemplate}/usr/ports" ] || ln -s /basejail/usr/ports "${ezjail_jailtemplate}/usr/ports"
275 275
276 # A ports collection inside jails is hardly useful w/o an appropriate 276 # A ports collection inside jails is hardly useful w/o an appropriate
277 # /etc/make.conf. 277 # /etc/make.conf.
278 if [ -f "${ezjail_examples}/default/etc/make.conf" -a ! -f "${ezjail_jailtemplate}/etc/make.conf" ]; then 278 if [ -f "${ezjail_examples}/example/etc/make.conf" -a ! -f "${ezjail_jailtemplate}/etc/make.conf" ]; then
279 cp -p "${ezjail_examples}/default/etc/make.conf" "${ezjail_jailtemplate}/etc/" 279 cp -p "${ezjail_examples}/example/etc/make.conf" "${ezjail_jailtemplate}/etc/"
280 echo "Note: a non-standard /etc/make.conf was copied to the template jail in order to get the ports collection running inside jails." 280 echo "Note: a non-standard /etc/make.conf was copied to the template jail in order to get the ports collection running inside jails."
281 fi 281 fi
282 282
@@ -480,6 +480,9 @@ create)
480 [ -e "${ezjail_softlink}" ] && ezjail_softlink=`mktemp -u "${ezjail_softlink}.XXXXXX"` 480 [ -e "${ezjail_softlink}" ] && ezjail_softlink=`mktemp -u "${ezjail_softlink}.XXXXXX"`
481 fi 481 fi
482 482
483 # if no flavour specified on command line, use default flavour
484 : ${ezjail_flavour=${ezjail_default_flavour}}
485
483 # do some sanity checks on the selected flavour (if any) 486 # do some sanity checks on the selected flavour (if any)
484 [ "${ezjail_flavour}" -a ! -d "${ezjail_flavours}/${ezjail_flavour}" ] && exerr "Error: Flavour config directory ${ezjail_flavours}/${ezjail_flavour} not found.\n Refer to ${ezjail_admin}s man page for details on flavours." 487 [ "${ezjail_flavour}" -a ! -d "${ezjail_flavours}/${ezjail_flavour}" ] && exerr "Error: Flavour config directory ${ezjail_flavours}/${ezjail_flavour} not found.\n Refer to ${ezjail_admin}s man page for details on flavours."
485 488