Ezjail host source upgrade

From TykWiki
Jump to navigationJump to search

first update world of the jail host:

  1. csup -L 2 /etc/stable-supfile && make -j8 buildworld && make -j8 buildkernel && make installkernel && reboot
  2. mergemaster -pFUi && make installworld && mergemaster -FUi && reboot
  3. ezjail-admin update -i
  4. rm /usr/jails/newjail/etc/make.conf

Finally, to run mergemaster in all jails (as root):

  • for jail in `jls -n jid`; do JID=`echo $jail | cut -d "=" -f 2`; echo Processing jail id $JID; JPATH=`jls -j $JID -n path`; JPATH=`echo $JPATH | cut -d "=" -f 2`; mount_nullfs /usr/src $JPATH/usr/src; mount_nullfs /usr/obj $JPATH/usr/obj; jexec $JID mergemaster -FUi; umount $JPATH/usr/src; umount $JPATH/usr/obj; done