Introduce a default flavour setting, also fix some leftovers from renaming default to example. Many thanks to Panagiotis J. Christias
This commit is contained in:
parent
22aa36af20
commit
02b7620839
2
Makefile
2
Makefile
@ -17,4 +17,4 @@ install:
|
|||||||
sed s:EZJAIL_PREFIX:${PREFIX}: man5/ezjail.5 > ${PREFIX}/man/man5/ezjail.5
|
sed s:EZJAIL_PREFIX:${PREFIX}: man5/ezjail.5 > ${PREFIX}/man/man5/ezjail.5
|
||||||
chmod 755 ${PREFIX}/etc/rc.d/ezjail.sh ${PREFIX}/bin/ezjail-admin
|
chmod 755 ${PREFIX}/etc/rc.d/ezjail.sh ${PREFIX}/bin/ezjail-admin
|
||||||
chown -R root:wheel ${PREFIX}/man/man1/ezjail-admin.1 ${PREFIX}/man/man5/ezjail.conf.5 ${PREFIX}/man/man5/ezjail.5 ${PREFIX}/share/examples/ezjail/
|
chown -R root:wheel ${PREFIX}/man/man1/ezjail-admin.1 ${PREFIX}/man/man5/ezjail.conf.5 ${PREFIX}/man/man5/ezjail.5 ${PREFIX}/share/examples/ezjail/
|
||||||
chmod 0440 ${PREFIX}/share/examples/ezjail/default/usr/local/etc/sudoers
|
chmod 0440 ${PREFIX}/share/examples/ezjail/example/usr/local/etc/sudoers
|
||||||
|
@ -268,15 +268,15 @@ ezjail_splitworld() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# If the default flavour example has not yet been copied, do it now
|
# 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
|
# no /usr/ports? link to /basejail/usr/ports
|
||||||
[ -e "${ezjail_jailtemplate}/usr/ports" ] || ln -s /basejail/usr/ports "${ezjail_jailtemplate}/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
|
# A ports collection inside jails is hardly useful w/o an appropriate
|
||||||
# /etc/make.conf.
|
# /etc/make.conf.
|
||||||
if [ -f "${ezjail_examples}/default/etc/make.conf" -a ! -f "${ezjail_jailtemplate}/etc/make.conf" ]; then
|
if [ -f "${ezjail_examples}/example/etc/make.conf" -a ! -f "${ezjail_jailtemplate}/etc/make.conf" ]; then
|
||||||
cp -p "${ezjail_examples}/default/etc/make.conf" "${ezjail_jailtemplate}/etc/"
|
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."
|
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
|
fi
|
||||||
|
|
||||||
@ -480,6 +480,9 @@ create)
|
|||||||
[ -e "${ezjail_softlink}" ] && ezjail_softlink=`mktemp -u "${ezjail_softlink}.XXXXXX"`
|
[ -e "${ezjail_softlink}" ] && ezjail_softlink=`mktemp -u "${ezjail_softlink}.XXXXXX"`
|
||||||
fi
|
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)
|
# 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."
|
[ "${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."
|
||||||
|
|
||||||
|
@ -27,7 +27,10 @@
|
|||||||
# ezjail_ftphost=ftp.freebsd.org
|
# ezjail_ftphost=ftp.freebsd.org
|
||||||
|
|
||||||
# This is the command that is being executed by the console subcommand
|
# This is the command that is being executed by the console subcommand
|
||||||
# ezjail_default_execute=/usr/bin/login -f root
|
# ezjail_default_execute="/usr/bin/login -f root"
|
||||||
|
|
||||||
|
# This is the flavour used by default when setting up a new jail
|
||||||
|
# ezjail_default_flavour=""
|
||||||
|
|
||||||
# This is the default location where ezjail archives its jails to
|
# This is the default location where ezjail archives its jails to
|
||||||
# ezjail_archivedir=`pwd -P`
|
# ezjail_archivedir=`pwd -P`
|
||||||
|
@ -112,6 +112,11 @@ for more information).
|
|||||||
Set to YES, if ezjail should provide a soft link from /usr/bin/perl to /usr/local/bin/perl in base jail.
|
Set to YES, if ezjail should provide a soft link from /usr/bin/perl to /usr/local/bin/perl in base jail.
|
||||||
.br
|
.br
|
||||||
.I default: YES
|
.I default: YES
|
||||||
|
.TP
|
||||||
|
.B ezjail_default_flavour (str)
|
||||||
|
Controls which flavour should be used for newly created jails.
|
||||||
|
.br
|
||||||
|
.I default: none
|
||||||
.SH ZFS OPTIONS
|
.SH ZFS OPTIONS
|
||||||
.TP
|
.TP
|
||||||
.B ezjail_use_zfs (bool)
|
.B ezjail_use_zfs (bool)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user