From bdbb4f9f37406900e1cf721869b955b8796f3e09 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Tue, 16 Jan 2007 14:15:21 +0000 Subject: do portsnap cron when not invoked from command line. Do copy packages that are just linked into jail root to make them visible at run time. --- ezjail-admin | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ezjail-admin') diff --git a/ezjail-admin b/ezjail-admin index 2062ebd..9e4e8f7 100755 --- a/ezjail-admin +++ b/ezjail-admin @@ -165,6 +165,7 @@ ezjail_splitworld() { # The user may want to have a ports tree in basejail ezjail_updateports () { + local _portsnap_fetch="fetch" # if /usr/ports/CVS exists, assume cvs up is safe # this is legacy if [ -f ${ezjail_jailbase}/usr/ports/CVS/Root ]; then @@ -173,7 +174,8 @@ ezjail_updateports () { echo "Gathering local information may take a while." cd ${ezjail_jailbase}/usr/ports/ && cvs -d ${ezjail_portscvsroot} up -Pd else - portsnap fetch + [ -z "$TERM" -o "$TERM" = dumb ] && _portsnap_fetch="cron" + portsnap ${_portsnap_fetch} [ -d ${ezjail_jailbase}/usr/ports ] && ezjail_portsnapaction=update portsnap -p ${ezjail_jailbase}/usr/ports ${ezjail_portsnapaction:-"extract"} fi @@ -402,6 +404,9 @@ create) cd ${ezjail_flavours}/${ezjail_flavour} && find * | cpio -p -u -v ${ezjail_rootdir} > /dev/null [ $? = 0 ] || echo "Warning: Could not fully install flavour." + # if the packages are links and not files we have to copy them now + find ${ezjail_rootdir}/pkg/ -type l -exec cp -r -f {} {}.ezjail \; -exec mv {}.ezjail {} \; + # If a config is found, make it auto run on jails startup if [ -f ${ezjail_rootdir}/ezjail.flavour ]; then ln -s /ezjail.flavour ${ezjail_rootdir}/etc/rc.d/ezjail-config.sh -- cgit v1.2.3