Re: Updating jails

2006-10-04 Thread Ivailo Tanusheff
I may give you a script how to update ports in the jails. You just need to 
have the same ports installed on your base system and build them with 
making a package ready for instalation. Personally I use: 
PACKAGES=/usr/ports/packages /usr/local/sbin/portupgrade -v -i -a -y -p

Then if you have made jails in /usr/local/jails use the following script:

#!/bin/sh

echo "***"
echo "* *"
echo "*Preparing mount points   *"
echo "* *"
echo "***"

/sbin/mount_nullfs /usr/ports/ /usr/local/jails//usr/ports
/sbin/mount_nullfs /usr/ports/ /usr/local/jails//usr/ports
...
/sbin/mount_nullfs /usr/ports/ /usr/local/jails//usr/ports

echo ""
echo ""
echo "***"
echo "* *"
echo "*Executing update script  *"
echo "* *"
echo "***"
echo ""
echo ""

for jid in `/usr/sbin/jls | /usr/bin/cut -c 1-6`; do
  if [ $jid != "JID" ]; then
echo "Updating:"
echo `/usr/sbin/jls | /usr/bin/grep JID`
echo `/usr/sbin/jls | /usr/bin/grep " $jid "`
echo -n "Continue with upgrade [y/n]: "
read oks
if [ "x$oks" = "xn" -o "x$oks" = "xN" ]; then
  echo "Skipping JID=$jid"
  echo ""
  echo ""
else
  /usr/sbin/jexec $jid /usr/local/bin/updateports.sh
fi
  fi
done


echo ""
echo ""
echo "***"
echo "* *"
echo "*Removing mount points*"
echo "* *"
echo "***"
echo ""
echo ""

/sbin/umount /usr/local/jails//usr/ports
/sbin/umount /usr/local/jails//usr/ports

/sbin/umount /usr/local/jails//usr/ports


This asks you for updating particular jail and executes 
/usr/local/bin/updateports.sh in each jail (you should copy it in every 
jail). You can use this:

#!/usr/local/bin/bash


echo ""
echo "*  *"
echo "* Updating indexes *"
echo "*  *"
echo ""


/usr/local/sbin/portsdb -u


echo ""
echo "*  *"
echo "* Fixing database  *"
echo "*  *"
echo ""



/usr/local/sbin/pkgdb -Fv



echo ""
echo "*  *"
echo "* Updating ports   *"
echo "*  *"
echo ""



/usr/local/sbin/portupgrade -v -i -a -y -f -PP


That is what I use in my jails. Hope this will help you :)
Regards,

Ivailo Tanusheff
Deputy Head of IT Department
ProCredit Bank (Bulgaria) AD





futhwo <[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED]
04.10.2006 16:24

To
FreeBSD Questions <[EMAIL PROTECTED]>
cc

Subject
Updating jails






Hi
We have an infrastructure composed by a few physical servers that 
contains some full jails (up to 10 jails per server). I am wondering 
what's the better and fastest way to bring the jails up-to-date when 
a new patchlevel or minor version is released and installed on the 
host system. This method would better be unattended, but it's not a 
requirement.

Hi
Ivan
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
"[EMAIL PROTECTED]"

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Updating jails

2006-10-04 Thread albi
On Wed, 4 Oct 2006 15:24:22 +0200
futhwo <[EMAIL PROTECTED]> wrote:

> We have an infrastructure composed by a few physical servers that  
> contains some full jails (up to 10 jails per server). I am wondering  
> what's the better and fastest way to bring the jails up-to-date when  
> a new patchlevel or minor version is released and installed on the  
> host system. This method would better be unattended, but it's not a  
> requirement.

you could try this :
http://memberwebs.com/nielsen/freebsd/jails/docs/jail_upgrade.html

-- 
grtjs,
albi
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Updating jails

2006-10-04 Thread futhwo

Hi
We have an infrastructure composed by a few physical servers that  
contains some full jails (up to 10 jails per server). I am wondering  
what's the better and fastest way to bring the jails up-to-date when  
a new patchlevel or minor version is released and installed on the  
host system. This method would better be unattended, but it's not a  
requirement.


Hi
Ivan
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"