diff options
Diffstat (limited to 'ezjail-admin')
-rwxr-xr-x | ezjail-admin | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/ezjail-admin b/ezjail-admin index 3099826..af62ae3 100755 --- a/ezjail-admin +++ b/ezjail-admin | |||
@@ -20,7 +20,6 @@ ezjail_jailcfgs="${ezjail_etc}/ezjail" | |||
20 | : ${ezjail_jailtemp="${ezjail_jaildir}/ezjailtemp"} | 20 | : ${ezjail_jailtemp="${ezjail_jaildir}/ezjailtemp"} |
21 | : ${ezjail_flavours_dir="${ezjail_jaildir}/flavours"} | 21 | : ${ezjail_flavours_dir="${ezjail_jaildir}/flavours"} |
22 | : ${ezjail_archivedir="${ezjail_jaildir}/ezjail_archives"} | 22 | : ${ezjail_archivedir="${ezjail_jaildir}/ezjail_archives"} |
23 | : ${ezjail_portscvsroot="freebsdanoncvs@anoncvs.FreeBSD.org:/home/ncvs"} | ||
24 | : ${ezjail_sourcetree="/usr/src"} | 23 | : ${ezjail_sourcetree="/usr/src"} |
25 | : ${ezjail_uglyperlhack="YES"} | 24 | : ${ezjail_uglyperlhack="YES"} |
26 | : ${ezjail_default_execute="/usr/bin/login -f root"} | 25 | : ${ezjail_default_execute="/usr/bin/login -f root"} |
@@ -312,20 +311,11 @@ ezjail_splitworld() { | |||
312 | # The user may want to have a ports tree in basejail | 311 | # The user may want to have a ports tree in basejail |
313 | ezjail_updateports () { | 312 | ezjail_updateports () { |
314 | local _portsnap_fetch="fetch" | 313 | local _portsnap_fetch="fetch" |
315 | # if /usr/ports/CVS exists, assume cvs up is safe | 314 | |
316 | # this is legacy | 315 | [ -z "$TERM" -o "$TERM" = "dumb" ] && _portsnap_fetch="cron" |
317 | if [ -f "${ezjail_jailbase}/usr/ports/CVS/Root" ]; then | 316 | portsnap ${_portsnap_fetch} |
318 | echo -n "Updating ports from "; cat "${ezjail_jailbase}/usr/ports/CVS/Root" | 317 | [ -d "${ezjail_jailbase}/usr/ports" ] && ezjail_portsnapaction="update" |
319 | echo "Warning: Upgrading legacy ports copy. Consider removing ${ezjail_jailbase}/usr/ports and use the new portsnap strategy instead." | 318 | portsnap -p "${ezjail_jailbase}/usr/ports" ${ezjail_portsnapaction:-"extract"} || exerr "Error: Updating ports failed." |
320 | echo "Gathering local information may take a while." | ||
321 | cd "${ezjail_jailbase}/usr/ports/" && cvs -d "${ezjail_portscvsroot}" up -Pd | ||
322 | else | ||
323 | [ -z "$TERM" -o "$TERM" = "dumb" ] && _portsnap_fetch="cron" | ||
324 | portsnap ${_portsnap_fetch} | ||
325 | [ -d "${ezjail_jailbase}/usr/ports" ] && ezjail_portsnapaction="update" | ||
326 | portsnap -p "${ezjail_jailbase}/usr/ports" ${ezjail_portsnapaction:-"extract"} | ||
327 | fi | ||
328 | [ $? -eq 0 ] || exerr "Error: Updating ports failed." | ||
329 | } | 319 | } |
330 | 320 | ||
331 | # Try to fetch the list of releases the server provides | 321 | # Try to fetch the list of releases the server provides |