summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xezjail-admin20
-rwxr-xr-xezjail.conf.sample13
-rwxr-xr-xman5/ezjail.conf.57
3 files changed, 13 insertions, 27 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
313ezjail_updateports () { 312ezjail_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
diff --git a/ezjail.conf.sample b/ezjail.conf.sample
index 1815486..84b4f8b 100755
--- a/ezjail.conf.sample
+++ b/ezjail.conf.sample
@@ -6,7 +6,7 @@
6 6
7# Location of jail root directories 7# Location of jail root directories
8# 8#
9# Note: If you have spread your jails to multiple locations, use softlinks 9# Note: If you have spread your jails to multiple locations, use softlinks
10# to collect them in this directory 10# to collect them in this directory
11# ezjail_jaildir=/usr/jails 11# ezjail_jaildir=/usr/jails
12 12
@@ -19,10 +19,6 @@
19# Location of your copy of FreeBSD's source tree 19# Location of your copy of FreeBSD's source tree
20# ezjail_sourcetree=/usr/src 20# ezjail_sourcetree=/usr/src
21 21
22# In case you want to provide a copy of ports tree in base jail, set this to
23# a cvsroot near you
24# ezjail_portscvsroot=freebsdanoncvs@anoncvs.FreeBSD.org:/home/ncvs
25
26# This is where the install sub command defaults to fetch its packages from 22# This is where the install sub command defaults to fetch its packages from
27# ezjail_ftphost=ftp.freebsd.org 23# ezjail_ftphost=ftp.freebsd.org
28 24
@@ -41,7 +37,7 @@
41 37
42# Default options for newly created jails 38# Default options for newly created jails
43# 39#
44# Note: Be VERY careful about disabling ezjail_mount_enable. Mounting 40# Note: Be VERY careful about disabling ezjail_mount_enable. Mounting
45# basejail via nullfs depends on this. You will have to find other 41# basejail via nullfs depends on this. You will have to find other
46# ways to provide your jail with essential system files 42# ways to provide your jail with essential system files
47# ezjail_mount_enable="YES" 43# ezjail_mount_enable="YES"
@@ -50,11 +46,16 @@
50# ezjail_procfs_enable="YES" 46# ezjail_procfs_enable="YES"
51# ezjail_fdescfs_enable="YES" 47# ezjail_fdescfs_enable="YES"
52 48
49# ZFS options
50
53# Setting this to YES will start to manage the basejail and newjail in ZFS 51# Setting this to YES will start to manage the basejail and newjail in ZFS
54# ezjail_use_zfs="YES" 52# ezjail_use_zfs="YES"
53
55# Setting this to YES will manage ALL new jails in their own zfs 54# Setting this to YES will manage ALL new jails in their own zfs
56# ezjail_use_zfs_for_jails="YES" 55# ezjail_use_zfs_for_jails="YES"
56
57# The name of the ZFS ezjail should create jails on, it will be mounted at the ezjail_jaildir 57# The name of the ZFS ezjail should create jails on, it will be mounted at the ezjail_jaildir
58
58# ezjail_jailzfs="tank/ezjail" 59# ezjail_jailzfs="tank/ezjail"
59# ADVANCED, be very careful! 60# ADVANCED, be very careful!
60# ezjail_zfs_properties="-o compression=lzjb -o atime=off" 61# ezjail_zfs_properties="-o compression=lzjb -o atime=off"
diff --git a/man5/ezjail.conf.5 b/man5/ezjail.conf.5
index 19eb2a1..806e760 100755
--- a/man5/ezjail.conf.5
+++ b/man5/ezjail.conf.5
@@ -56,11 +56,6 @@ Location of the flavours, where each directory is a different flavour.
56.br 56.br
57Default: 57Default:
58.Em ${ezjail_jaildir}/flavours . 58.Em ${ezjail_jaildir}/flavours .
59.It ezjail_portscvsroot (str)
60CVS root to use when checking out or updating the ports tree in base jail.
61.br
62Default:
63.Em :pserver:anoncvs@anoncvs.FreeBSD.org:/home/ncvs .
64.It ezjail_ftphost (str) 59.It ezjail_ftphost (str)
65This is where the install subcommand defaults to fetch its packages from. 60This is where the install subcommand defaults to fetch its packages from.
66.br 61.br
@@ -222,4 +217,4 @@ The man page is based on a draft by
222.Aq joeb1@a1poweruser.com 217.Aq joeb1@a1poweruser.com
223and was rewritten by 218and was rewritten by
224.An Frederic Perrin 219.An Frederic Perrin
225.Aq frederic.perrin@resel.fr . \ No newline at end of file 220.Aq frederic.perrin@resel.fr .