# If not, there is nothing to do.
isset zone || exit ${EXIT_OK}
- # If the zone is already up, we add the device
- # to the zone.
- if zone_is_up ${zone}; then
- zone_up ${zone}
+ # If the zone is already up or enabled for auto-start,
+ # we add the device to the zone.
+ if zone_is_up "${zone}" || zone_is_enabled "${zone}"; then
+ zone_up "${zone}"
fi
;;
isset sim_imsi || exit ${EXIT_OK}
for zone in $(zones_get_all); do
- # XXX Check if the zone is enabled.
+ # Skip zones that are not enabled for auto-start.
+ if ! zone_is_enabled "${zone}"; then
+ continue
+ fi
# Skip unsupported hook types.
hook="$(zone_get_hook "${zone}")"