From 02b7620839a428c58924153f8f9fab3cb80b486a Mon Sep 17 00:00:00 2001 From: erdgeist Date: Thu, 14 Jan 2010 02:11:03 +0000 Subject: Introduce a default flavour setting, also fix some leftovers from renaming default to example. Many thanks to Panagiotis J. Christias --- ezjail-admin | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'ezjail-admin') diff --git a/ezjail-admin b/ezjail-admin index 417eb0e..5438a56 100755 --- a/ezjail-admin +++ b/ezjail-admin @@ -268,15 +268,15 @@ ezjail_splitworld() { fi # If the default flavour example has not yet been copied, do it now - [ -d "${ezjail_flavours}/default" ] || mkdir -p "${ezjail_flavours}" && cp -p -R "${ezjail_examples}/default" "${ezjail_flavours}" + [ -d "${ezjail_flavours}/example" ] || mkdir -p "${ezjail_flavours}" && cp -p -R "${ezjail_examples}/example" "${ezjail_flavours}" # no /usr/ports? link to /basejail/usr/ports [ -e "${ezjail_jailtemplate}/usr/ports" ] || ln -s /basejail/usr/ports "${ezjail_jailtemplate}/usr/ports" # A ports collection inside jails is hardly useful w/o an appropriate # /etc/make.conf. - if [ -f "${ezjail_examples}/default/etc/make.conf" -a ! -f "${ezjail_jailtemplate}/etc/make.conf" ]; then - cp -p "${ezjail_examples}/default/etc/make.conf" "${ezjail_jailtemplate}/etc/" + if [ -f "${ezjail_examples}/example/etc/make.conf" -a ! -f "${ezjail_jailtemplate}/etc/make.conf" ]; then + cp -p "${ezjail_examples}/example/etc/make.conf" "${ezjail_jailtemplate}/etc/" echo "Note: a non-standard /etc/make.conf was copied to the template jail in order to get the ports collection running inside jails." fi @@ -480,6 +480,9 @@ create) [ -e "${ezjail_softlink}" ] && ezjail_softlink=`mktemp -u "${ezjail_softlink}.XXXXXX"` fi + # if no flavour specified on command line, use default flavour + : ${ezjail_flavour=${ezjail_default_flavour}} + # do some sanity checks on the selected flavour (if any) [ "${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." -- cgit v1.2.3