[zones-discuss] Script run from global zone into local zones - to shut them down

2008-05-09 Thread Anne Moore
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

Re: [zones-discuss] Script run from global zone into local zones - to shut them down

2008-05-09 Thread Anne Moore
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

Re: [zones-discuss] Script run from global zone into local zones - to shut them down

2008-05-09 Thread Sean McGrath - Sun Microsystems Ireland
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

Re: [zones-discuss] Script run from global zone into local zones - to shut them down

2008-05-09 Thread Jordan Brown (Sun)
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..