|
root / base / usr / src / zyginit / services / zones / start.sh
start.sh Bash 20 lines 711 B
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
# Boot installed zones whose autoboot property is true; sysboot the
# rest. Trimmed-down version of upstream svc-zones (drops SMF FMRI
# tracking and waits).
set -e
[ -x /usr/sbin/zoneadm ] || exit 0   # zoneadm not installed
[ -f /etc/zones/index ]  || exit 0   # no zone configs
/bin/egrep -vs '^#|^global:' /etc/zones/index || exit 0   # only global zone

for zone in $(/usr/sbin/zoneadm list -pi | /bin/nawk -F: '$3=="installed"{print $2}'); do
    if /usr/sbin/zonecfg -z "$zone" info autoboot 2>/dev/null | /bin/grep -q true; then
        /bin/echo "Booting zone: $zone"
        /usr/sbin/zoneadm -z "$zone" boot &
    else
        /usr/sbin/zoneadm -z "$zone" sysboot &
    fi
done
wait
exit 0