diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2007-01-16 14:15:21 +0000 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2007-01-16 14:15:21 +0000 |
| commit | bdbb4f9f37406900e1cf721869b955b8796f3e09 (patch) | |
| tree | f4b7f8b6eb6c3abcf9cb3a843ac988b4a69c33e3 /ezjail-admin | |
| parent | b37e9be76301f0c7860c0b60a1030d8fa5e20220 (diff) | |
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.
Diffstat (limited to 'ezjail-admin')
| -rwxr-xr-x | ezjail-admin | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ezjail-admin b/ezjail-admin index 2062ebd..9e4e8f7 100755 --- a/ezjail-admin +++ b/ezjail-admin | |||
| @@ -165,6 +165,7 @@ ezjail_splitworld() { | |||
| 165 | 165 | ||
| 166 | # The user may want to have a ports tree in basejail | 166 | # The user may want to have a ports tree in basejail |
| 167 | ezjail_updateports () { | 167 | ezjail_updateports () { |
| 168 | local _portsnap_fetch="fetch" | ||
| 168 | # if /usr/ports/CVS exists, assume cvs up is safe | 169 | # if /usr/ports/CVS exists, assume cvs up is safe |
| 169 | # this is legacy | 170 | # this is legacy |
| 170 | if [ -f ${ezjail_jailbase}/usr/ports/CVS/Root ]; then | 171 | if [ -f ${ezjail_jailbase}/usr/ports/CVS/Root ]; then |
| @@ -173,7 +174,8 @@ ezjail_updateports () { | |||
| 173 | echo "Gathering local information may take a while." | 174 | echo "Gathering local information may take a while." |
| 174 | cd ${ezjail_jailbase}/usr/ports/ && cvs -d ${ezjail_portscvsroot} up -Pd | 175 | cd ${ezjail_jailbase}/usr/ports/ && cvs -d ${ezjail_portscvsroot} up -Pd |
| 175 | else | 176 | else |
| 176 | portsnap fetch | 177 | [ -z "$TERM" -o "$TERM" = dumb ] && _portsnap_fetch="cron" |
| 178 | portsnap ${_portsnap_fetch} | ||
| 177 | [ -d ${ezjail_jailbase}/usr/ports ] && ezjail_portsnapaction=update | 179 | [ -d ${ezjail_jailbase}/usr/ports ] && ezjail_portsnapaction=update |
| 178 | portsnap -p ${ezjail_jailbase}/usr/ports ${ezjail_portsnapaction:-"extract"} | 180 | portsnap -p ${ezjail_jailbase}/usr/ports ${ezjail_portsnapaction:-"extract"} |
| 179 | fi | 181 | fi |
| @@ -402,6 +404,9 @@ create) | |||
| 402 | cd ${ezjail_flavours}/${ezjail_flavour} && find * | cpio -p -u -v ${ezjail_rootdir} > /dev/null | 404 | cd ${ezjail_flavours}/${ezjail_flavour} && find * | cpio -p -u -v ${ezjail_rootdir} > /dev/null |
| 403 | [ $? = 0 ] || echo "Warning: Could not fully install flavour." | 405 | [ $? = 0 ] || echo "Warning: Could not fully install flavour." |
| 404 | 406 | ||
| 407 | # if the packages are links and not files we have to copy them now | ||
| 408 | find ${ezjail_rootdir}/pkg/ -type l -exec cp -r -f {} {}.ezjail \; -exec mv {}.ezjail {} \; | ||
| 409 | |||
| 405 | # If a config is found, make it auto run on jails startup | 410 | # If a config is found, make it auto run on jails startup |
| 406 | if [ -f ${ezjail_rootdir}/ezjail.flavour ]; then | 411 | if [ -f ${ezjail_rootdir}/ezjail.flavour ]; then |
| 407 | ln -s /ezjail.flavour ${ezjail_rootdir}/etc/rc.d/ezjail-config.sh | 412 | ln -s /ezjail.flavour ${ezjail_rootdir}/etc/rc.d/ezjail-config.sh |
