service_stop "network@${zone}.service"
}
+function zone_reload() {
+ local zone="${1}"
+ assert zone_exists "${zone}"
+
+ service_reload "network@${zone}.service"
+}
+
function zone_enable() {
# This function will enable the zone
# with help of systemd.
return ${EXIT_FALSE}
}
+function zone_is_active() {
+ local zone="${1}"
+ assert isset zone
+
+ if service_is_active "network@${zone}.service"; then
+ return ${EXIT_TRUE}
+ fi
+
+ return ${EXIT_FALSE}
+}
+
function zone_create() {
local zone=${1}
local hook=${2}
# Action aliases
case "${action}" in
- start)
+ start|reload)
action="up"
;;
stop)
RemainAfterExit=yes
ExecStart=@sbindir@/network zone %I up
ExecStop=@sbindir@/network zone %I down
+ExecReload=@sbindir@/network zone %I reload
[Install]
WantedBy=network.target
# 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}"
+ if zone_is_active "${zone}"; then
+ zone_reload "${zone}"
+ elif zone_is_enabled "${zone}"; then
+ zone_start "${zone}"
fi
;;