[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ezjail] ezjail freebsd-update



Graham Todd wrote:
Robert Clemens wrote:
  
Actually have a couple questions.

1) On some systems I use the freebsd-update utility to provide binary
updates to the system instead of buildworld/installworld.
How would I apply these updates to the basejail for updating? I looked
at "ezjail-admin update -u" but it didn't seem to do anything
other than run freebsd-update for me.
    
Which version of ezjail are you using? I believe the latest
not-officially-released-from-CVS beta handles this better than in the
past.  On previous versions I was unable to do this cleanly with various
freebsd-update.conf tweaks. The closest I came to success was to chroot
into the full basejail and run freebsd-update from there but this didn't
sync things correctly with the host system.

I believe the current CVS version avoids the binary diffing etc. and just
downloads a full new version of the base system?

  
I'm using 3.0 from ports of ezjail. Haven't tried any dev releases yet.

  
2) I sometimes get multiple listings of a single jail within "jls". On a
reboot my system will load all jails correctly and list each individually
with correct JIDs. If I issue a shutdown "ezjail.sh stop jailname" it
sometimes leaves the jail showing as still up even though its not. When
I reload the jail with "ezjail.sh start jailname" the jail correctly
loads and is fully useable. The "jls" utility shows 2 different IDs for
the jails
and the same name and same ip listed. I can actually jexec into the
"old" jail and it only shows my shell (/usr/local/bin/bash) as the only
process.
The other ID (containing the newly running jail) shows all processes and
works as normal. Any idea on this?
    
What version of FreeBSD are you using?  I think this bug was due to an
issue with ezjail interaction with /etc/rc.d/jail

  
Actually using a 7.1-BETA2 build. It's quite fast and stable. Haven't had a single issue. Should  be
a -RELEASE within a month after having talked with some developers.
cheers,

ps: My cosmetic patch to ezjail.sh :-D

--- ezjail.sh	2008-03-26 13:32:20.000000000 -0400
+++ ezjail.sh-cosmeticfix	2008-11-21 12:43:58.000000000 -0500
@@ -46,7 +46,7 @@
   else
     case "${action}" in *stop) reverse_command="tail -r";; *)
reverse_command="cat";; esac
     [ -d "${ezjail_prefix}/etc/ezjail/" ] && cd
"${ezjail_prefix}/etc/ezjail/" && ezjail_list=`ls | xargs rcorder |
${reverse_command}`
-    echo -n "${message##_}"
+    echo -n "${message##_}:
   fi

   for ezjail in ${ezjail_list}; do


  
You might want to add the end quotes (") to that echo line. Should work without em but would be good form to toss em back in.

--
Robert Clemens
robert AT solidsolutions DOT net