diff options
Diffstat (limited to 'usr/src/cmd/zoneadmd/zoneadmd.c')
-rw-r--r-- | usr/src/cmd/zoneadmd/zoneadmd.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/usr/src/cmd/zoneadmd/zoneadmd.c b/usr/src/cmd/zoneadmd/zoneadmd.c index 7a9d88410d..cb81b77727 100644 --- a/usr/src/cmd/zoneadmd/zoneadmd.c +++ b/usr/src/cmd/zoneadmd/zoneadmd.c @@ -817,6 +817,7 @@ zone_bootup(zlog_t *zlogp, const char *bootargs, int zstate) dladm_status_t status; char errmsg[DLADM_STRSIZE]; int err; + boolean_t restart_init; if (brand_prestatechg(zlogp, zstate, Z_BOOT) != 0) return (-1); @@ -873,6 +874,9 @@ zone_bootup(zlog_t *zlogp, const char *bootargs, int zstate) goto bad; } + /* See if this zone's brand should restart init if it dies. */ + restart_init = brand_restartinit(bh); + brand_close(bh); err = filter_bootargs(zlogp, bootargs, nbootargs, init_file, @@ -939,6 +943,12 @@ zone_bootup(zlog_t *zlogp, const char *bootargs, int zstate) goto bad; } + if (!restart_init && zone_setattr(zoneid, ZONE_ATTR_INITNORESTART, + NULL, 0) == -1) { + zerror(zlogp, B_TRUE, "could not set zone init-no-restart"); + goto bad; + } + /* * Inform zonestatd of a new zone so that it can install a door for * the zone to contact it. |