All
I'm trying to write a script that will shutdown all zones from the local
zone. I'm not terribly good with scripting (yet), but thought many of you
would be.
I need to run the command zoneadm list and then output each line to a
different variable to run this command:
zlogin $zonename1
You guys are awesome. Thanks for the great responses!
Anne
-Original Message-
From: Jordan Brown (Sun) [mailto:[EMAIL PROTECTED]
Sent: Friday, May 09, 2008 2:17 PM
To: Anne Moore
Cc: zones-discuss@opensolaris.org
Subject: Re: [zones-discuss] Script run from global zone into local zones
surely use zoneadm halt instead of zlogin ?
along with zoneadm list -p and grep for running zones..
for z in `zoneadmn list -p | grep running | grep -v global | awk -F: '{print
$2}'`
do
zoneadm halt $z
done
Regards,
Sean.
.
Craig Cory stated:
Anne,
Something like this should work
Depends on whether you want to take the zone down *now* or want the
gradual shutdown behavior of shutdown. Granted, -g0 is pretty abrupt.
Sean McGrath - Sun Microsystems Ireland wrote:
surely use zoneadm halt instead of zlogin ?
along with zoneadm list -p and grep for running zones..