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

2008-05-09 Thread Craig Cory
Beware that the 'halt' command will use killall to stop all processes - perhaps too severe for your delicate applications. 'shutdown'/'init #' will use the smf system for state changes. Craig In response to Jordan Brown (Sun), who said: > Depends on whether you want to take the zone down *now* o

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..

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 wor

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 Craig Cory
Anne, Something like this should work for you: === #!/bin/sh for z in `zoneadm list` do if [ "$z" = "global" ]; then continue fi zlogin $z shutdown -y -g0 -i0 done Regards, Craig In response to Anne Moore, who said: > All >

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

2008-05-09 Thread Ihsan Zaghmouth
for zone in `zoneadm list` do if [ "$zone" = "global" ]; then continue; else zlogin -S $zone "shutdown -y -g0 -i0" fi done Anne Moore wrote: All I'm trying to write a script that will shutdown all zones from the local zone. I'm not terribly good with scr

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

2008-05-09 Thread Jordan Brown (Sun)
Anne Moore wrote: > 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

[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 sh