2 ###############################################################################
4 # IPFire.org - A linux based firewall #
5 # Copyright (C) 2010 Michael Tremer & Christian Schmidt #
7 # This program is free software: you can redistribute it and/or modify #
8 # it under the terms of the GNU General Public License as published by #
9 # the Free Software Foundation, either version 3 of the License, or #
10 # (at your option) any later version. #
12 # This program is distributed in the hope that it will be useful, #
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15 # GNU General Public License for more details. #
17 # You should have received a copy of the GNU General Public License #
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
20 ###############################################################################
25 echo "${NETWORK_ZONE_DIR}/zones/${zone}"
32 [ -d "$(zone_dir ${zone})" ]
39 for i
in ${VALID_ZONES}; do
40 match
="${match}|${i}[0-9]{1,5}"
43 echo "${match:1:${#match}}"
46 zone_name_is_valid
() {
49 # Don't accept empty strings.
50 [ -z "${zone}" ] && return ${EXIT_FALSE}
52 [[ ${zone} =~ $
(zone_match
) ]]
58 [[ "${zone:0:${#ZONE_LOCAL}}" = "${ZONE_LOCAL}" ]]
64 [[ "${zone:0:${#ZONE_NONLOCAL}}" = "${ZONE_NONLOCAL}" ]]
71 config_get_hook $
(zone_dir
${zone})/settings
75 # This function will bring up the zone
76 # 'asynchronously' with help of systemd.
79 assert zone_exists
${zone}
81 service_start
"network@${zone}.service"
86 assert zone_exists
"${zone}"
88 # If the zone has already been started, we
89 # will reload it so the current configuration
91 if zone_is_active
"${zone}"; then
95 # If the zone is still down, but in auto-start mode,
97 elif zone_is_enabled
"${zone}"; then
102 # Otherwise, nothing will be done.
107 # This function will bring down the zone
108 # 'asynchronously' with help of systemd.
111 assert zone_exists
${zone}
113 service_stop
"network@${zone}.service"
118 assert zone_exists
"${zone}"
120 service_reload
"network@${zone}.service"
123 zone_hotplug_event
() {
127 hotplug_assert_in_hotplug_event
129 zone_cmd
"hotplug" "${zone}"
133 # This function will enable the zone
134 # with help of systemd.
137 assert zone_exists
"${zone}"
139 # Enable service for the zone
140 service_enable
"network@${zone}.service"
143 if [ ${ret} -eq ${EXIT_OK} ]; then
144 log INFO
"Auto-start enabled for zone ${zone}"
148 log ERROR
"Could not enable zone ${zone}: ${ret}"
153 # This function will disable the zone
154 # with help of systemd.
157 assert zone_exists
"${zone}"
159 # Disable service for the zone
160 service_disable
"network@${zone}.service"
163 if [ ${ret} -eq ${EXIT_OK} ]; then
164 log INFO
"Auto-start disabled for zone ${zone}"
168 log ERROR
"Could not disable zone ${zone}: ${ret}"
176 # Ask systemd if the zone is enabled.
177 if service_is_enabled
"network@${zone}.service"; then
188 if service_is_active
"network@${zone}.service"; then
195 zone_is_enabled_or_active
() {
199 zone_is_enabled
"${zone}" || zone_is_active
"${zone}"
210 local hook
="$(zone_get_hook ${zone})"
213 hook_exec zone
"${hook}" "${cmd}" "${zone}" $@
221 if ! zone_name_is_valid
${zone}; then
222 error
"Zone name '${zone}' is not valid."
226 if zone_exists
${zone}; then
227 error
"Zone '${zone}' does already exist."
231 if ! hook_zone_exists
${hook}; then
232 error
"Hook '${hook}' does not exist."
236 mkdir
-p $
(zone_dir
${zone})
238 # Create directories for configs and ports
239 mkdir
-p $
(zone_dir
${zone})/{configs
,ports
}
241 hook_zone_exec
"${hook}" "new" "${zone}" $@
244 # Maybe the zone new hook did not exit correctly.
245 # If this is the case we remove the created zone immediately.
246 if [ "${ret}" != "${EXIT_OK}" ]; then
247 zone_destroy_now
"${zone}"
251 # Automatically enable zone.
252 zone_enable
"${zone}"
254 # Bring up the zone immediately after
262 if ! zone_exists
${zone}; then
263 error
"Zone '${zone}' does not exist."
267 # Check if the zone is tagged for removal.
268 if zone_has_destroy_tag
${zone}; then
269 error
"You cannot edit a zone that is tagged for removal."
273 local hook
="$(zone_get_hook "${zone}")"
274 if [ -z "${hook}" ]; then
275 error
"Config file did not provide any hook."
279 if ! hook_zone_exists
${hook}; then
280 error
"Hook '${hook}' does not exist."
284 hook_zone_exec
${hook} edit
${zone} $@
293 assert zone_exists
"${zone}"
294 assert not zone_has_destroy_tag
"${zone}"
295 assert not zone_exists
"${name}"
297 # The zone must be shut down before, is then renamed and
298 # potentially brought up again
300 # Save if the zone is running right now
301 zone_is_active
"${zone}"
302 local zone_was_active
="${?}"
304 # Save if the zone is enabled (i.e. auto-start)
305 zone_is_enabled
"${zone}"
306 local zone_was_enabled
="${?}"
312 zone_disable
"${zone}"
314 # Rename the configuration files
315 mv -f "$(zone_dir "${zone}")" "$(zone_dir "${name}")"
317 # Enable the zone if it was enabled before
318 [ ${zone_was_enabled} -eq ${EXIT_TRUE} ] && zone_enable "${name}"
320 # Start the zone if it was up before
321 [ ${zone_was_active} -eq ${EXIT_TRUE} ] && zone_start "${name}"
323 log INFO
"Zone ${zone} was renamed to ${name}"
330 assert zone_exists
"${zone}"
332 # Make the zone for removal.
333 touch "$(zone_dir "${zone}")/.destroy"
335 log INFO
"Zone '${zone}' has been tagged for removal."
338 zone_has_destroy_tag
() {
340 assert zone_exists
"${zone}"
342 [ -e "$(zone_dir "${zone}")/.destroy" ]
345 # This function will remove the given zone
346 # RIGHT NOW. Use zone_destroy to remove it
347 # at the next status change.
350 assert zone_exists
"${zone}"
352 log INFO
"Removing zone '${zone}' right now."
354 # Force the zone down.
355 zone_is_active
"${zone}" && zone_stop
"${zone}"
358 zone_disable
"${zone}"
360 rm -rf "$(zone_dir "${zone}")"
367 if ! zone_exists
${zone}; then
368 error
"Zone '${zone}' does not exist."
372 # Check if a zone has got the remove tag.
373 if zone_has_destroy_tag
${zone}; then
374 error
"Cannot bring up any zone which is to be removed."
378 local hook
="$(zone_get_hook "${zone}")"
379 if [ -z "${hook}" ]; then
380 error
"Config file did not provide any hook."
384 if ! hook_zone_exists
${hook}; then
385 error
"Hook '${hook}' does not exist."
389 zone_db
${zone} starting
391 hook_zone_exec
${hook} up
${zone} $@
393 zone_db
${zone} started
395 # Execute all triggers after the zone got up
396 triggers_execute_all
"up" ZONE
="${zone}"
403 if ! zone_exists
${zone}; then
404 error
"Zone '${zone}' does not exist."
408 local hook
="$(zone_get_hook "${zone}")"
409 if [ -z "${hook}" ]; then
410 error
"Config file did not provide any hook."
414 if ! hook_zone_exists
${hook}; then
415 error
"Hook '${hook}' does not exist."
419 zone_db
${zone} stopping
421 hook_zone_exec
${hook} down
${zone} $@
423 zone_db
${zone} stopped
425 # Execute all triggers after the zone went down
426 triggers_execute_all
"down" ZONE
="${zone}"
428 # Remove the zone, if it has got a remove tag.
429 if zone_has_destroy_tag
"${zone}"; then
430 zone_destroy_now
"${zone}"
439 if ! zone_exists
"${zone}"; then
440 error
"Zone '${zone}' does not exist."
444 local hook
="$(zone_get_hook "${zone}")"
445 if [ -z "${hook}" ]; then
446 error
"Config file did not provide any hook."
450 if ! hook_zone_exists
"${hook}"; then
451 error
"Hook '${hook}' does not exist."
455 hook_zone_exec
"${hook}" "status" "${zone}" "$@"
457 # Show that the zone it to be removed soon.
458 if zone_has_destroy_tag
${zone}; then
459 warning
"This zone is tagged for removal."
469 assert zone_exists
"${zone}"
471 log INFO
"Identifying zone ${zone}"
476 for port
in $
(zone_get_ports
"${zone}"); do
477 # Identify all the ports
478 port_identify
"${port}" --background $@
480 # Save the PIDs of the subprocesses
481 list_append pids
"$(cmd_background_get_pid)"
484 # Wait until all port_identfy processes have finished
485 for pid
in ${pids}; do
486 cmd_background_result
"${pid}"
498 for port
in $
(zone_dir
${zone})/ports
/*; do
499 port
=$
(basename ${port})
501 if port_exists
${port}; then
507 zone_get_ports_num
() {
513 for port
in $
(zone_dir
"${zone}")/ports
/*; do
514 port
="$(basename "${port}")"
516 if port_exists
"${port}"; then
517 counter
=$
(( ${counter} + 1 ))
526 # Check, if the given port is configured
536 [ -e "$(zone_dir ${zone})/ports/${port}" ]
546 assert zone_exists
"${zone}"
550 zone_config_new
"${zone}" "$@"
553 # usually ${1} is a valid hid
557 # We convert the hid into an id
558 local id
=$
(zone_config_convert_hid_to_id
${zone} ${hid})
560 # If id isset the hid is valid and we can go on with the id
562 zone_config_destroy
"${zone}" "${id}" "$@"
564 # If we can't get a valid hid we check if we got a valid id
566 if zone_config_id_is_valid
${zone} ${hid}; then
567 zone_config_destroy
"${zone}" ${hid} "$@"
569 log ERROR
"${id} is not a valid id or hid"
574 zone_config_list
"${zone}" "$@"
577 # usually ${1} is a valid hid
582 local id
=$
(zone_config_convert_hid_to_id
${zone} ${hid})
584 # If id isset the hid is valid and we can go on with the id
585 if isset id
&& [[ ${cmd} == "edit" ]]; then
586 zone_config_edit
"${zone}" "${id}" "$@"
588 # If we didn't get a valid hid we check if we got a valid id
590 if zone_config_id_is_valid
${zone} ${id} && [[ ${cmd} == "edit" ]]; then
592 zone_config_edit
"${zone}" "${id}" "$@"
594 # in ${hid} is saved the command after network zone ${zone} config
595 error
"Unrecognized argument: ${hid}"
596 cli_usage root-zone-config-subcommands
611 local hook
="$(zone_get_hook "${zone}")"
614 hook_zone_exec
"${hook}" "config_${cmd}" "${zone}" "$@"
621 # Create a new configuration, but exit when that was
623 zone_config_cmd
"new" "${zone}" "$@" ||
return ${?}
625 # If the config could be created, we will try to bring
626 # it up if the zone is up, too.
627 if zone_is_up
"${zone}"; then
628 zone_configs_up
"${zone}"
632 zone_config_destroy
() {
633 zone_config_cmd
"destroy" "$@"
637 zone_config_cmd
"edit" "$@"
641 # This function list in an nice way all configs of a zone
645 # Print a nice header
646 local format
="%-3s %-20s %-20s"
647 print
"${format}" "ID" "HOOK" "HID"
654 # Print for all config:
656 for config
in $
(zone_configs_list
"${zone}"); do
658 hook
=$
(zone_config_get_hook
"${zone}" "${config}")
659 hid
=$
(zone_config_get_hid
"${zone}" "${config}")
661 print
"${format}" "${id}" "${hook}" "${hid}"
666 zone_config_cmd
"show" "$@"
669 # Returns a list of all used ids for a zone
670 zone_config_list_ids
() {
677 for config
in $
(zone_configs_list
${zone}); do
678 list_append ids
"$(config_get_id_from_config ${config})"
684 # List all hids of a zone
685 zone_config_list_hids
() {
691 for config
in $
(zone_configs_list
${zone}); do
692 zone_config_get_hid
"${zone}" "${config}"
696 # get the hid from a given config
697 zone_config_get_hid
() {
703 local hook
="$(zone_config_get_hook "${zone}" "${config}")"
705 hook_exec
"config" "${hook}" "hid" "${zone}" "${config}"
708 # Checks if a hid is valid for a given zone
709 zone_config_hid_is_valid
() {
716 for _hid
in $
(zone_config_list_hids
"${zone}"); do
717 if [[ ${_hid} = ${hid} ]]; then
725 # This function converts a hid to a id
726 zone_config_convert_hid_to_id
() {
733 for config
in $
(zone_configs_list
${zone}); do
734 # Get hook from config
735 local hook
="$(zone_config_get_hook "${zone}" "${config}")"
737 if [[ "$(hook_exec "config
" "${hook}" "hid" "${zone}" "${config}")" == "${hid}" ]]; then
738 config_get_id_from_config "${config}"
750 echo " Type
: $
(zone_get_hook
${zone})"
757 for zone in $(zones_get $@); do
764 for zone in $(zone_dir)/*; do
765 zone=$(basename ${zone})
766 zone_exists ${zone} || continue
772 zones_get_next_free() {
773 # This function return the next free zones.
774 # Example net0 upl0 upl1 are configured so the next free zones are:
778 for zone_name in ${VALID_ZONES}; do
782 local zone="${zone_name}${i}"
783 if ! zone_exists ${zone}; then
794 for zone in $(zones_get_all); do
795 zone_is_local ${zone} && echo "${zone}"
799 zones_get_nonlocal() {
801 for zone in $(zones_get_all); do
802 zone_is_nonlocal ${zone} && echo "${zone}"
812 while [ $# -gt 0 ]; do
827 if zone_name_is_valid ${1}; then
828 zones="${zones} ${1}"
830 warning "Unrecognized argument
'${1}'"
837 if [ -n "${zones}" ]; then
839 for zone in ${zones}; do
840 zone_exists ${zone} && echo "${zone}"
845 if [ ${local} -eq 1 ] && [ ${remote} -eq 1 ]; then
847 elif [ ${local} -eq 1 ]; then
849 elif [ ${remote} -eq 1 ]; then
858 for port in $(zone_dir ${zone})/ports/*; do
859 [ -e "${port}" ] || continue
861 echo $(basename ${port})
874 # Check if the port actually exists.
875 if ! port_exists "${port}"; then
876 error "Cannot attach port
'${port}' which does not exist
"
880 # Check if the port is already connected to this or any other zone.
882 for z in $(zones_get_all); do
883 if zone_has_port "${z}" "${port}"; then
884 error "Port
'${port}' is already attached to zone
'${z}'"
889 local hook="$
(zone_get_hook
"${zone}")"
892 # Make the port briefly flash if supported
893 if device_exists ${port}; then
894 port_identify "${port}" --background
897 hook_zone_exec "${hook}" "port_attach" "${zone}" "${port}" "$@
"
902 log INFO "${port} has been attached to
${zone}"
904 # Automatically connect the port
905 zone_port_start "${zone}" "${port}"
908 log CRITICAL "${port} could not be attached to
${zone}"
924 # Check if the port actually exists.
925 if ! port_exists "${port}"; then
926 error "Port
'${port}' does not exist
"
930 # Check if the zone actually has this port.
931 if ! zone_has_port "${zone}" "${port}"; then
932 error "Port
'${port}' is not attached to zone
'${zone}'"
936 local hook=$(zone_get_hook "${zone}")
939 hook_zone_exec "${hook}" "port_edit" "${zone}" "${port}" "$@
"
951 # Check if the zone actually has this port.
952 if ! zone_has_port "${zone}" "${port}"; then
953 error "Port
'${port}' is not attached to zone
'${zone}'"
957 local hook=$(zone_get_hook "${zone}")
960 # Make the port briefly flash if supported
961 port_identify "${port}" --background
963 hook_zone_exec "${hook}" "port_detach" "${zone}" "${port}" "$@
"
968 log INFO "${port} has been detached from
${zone}"
970 # Bring down the port if needed
971 zone_port_stop "${zone}" "${port}"
974 log CRITICAL "${port} could not be detached from
${zone}"
993 local hook="$
(zone_get_hook
"${zone}")"
996 # Dispatch command to hook
997 hook_zone_exec "${hook}" "${cmd}" "${zone}" "${port}" $@
1000 zone_port_create() {
1001 zone_port_cmd "port_create
" $@
1004 zone_port_remove() {
1005 zone_port_cmd "port_remove
" $@
1009 zone_port_cmd "port_up
" $@
1013 zone_port_cmd "port_down
" $@
1016 # The next two functions automagically bring up and down
1017 # port that are attached to a bridge or similar.
1018 # The problem that is tried to overcome here is that there
1019 # are ports which exist all the time (like ethernet ports)
1020 # and therefore do not dispatch a hotplug event when
1021 # port_create is called.
1027 if zone_is_active "${zone}"; then
1028 if device_exists "${port}"; then
1029 zone_port_up "${zone}" "${port}"
1032 zone_port_create "${zone}" "${port}"
1044 # Shut down the port if necessary
1045 if zone_is_active "${zone}" && port_is_up "${port}"; then
1046 zone_port_down "${zone}" "${port}"
1050 zone_port_remove "${zone}" "${port}"
1053 zone_port_status() {
1054 zone_port_cmd "port_status
" $@
1066 local hook="$
(zone_get_hook
"${zone}")"
1069 for port in $(zone_get_ports ${zone}); do
1070 hook_zone_exec "${hook}" "${cmd}" "${zone}" "${port}" $@
1074 zone_ports_create() {
1075 zone_ports_cmd "port_create
" $@
1078 zone_ports_remove() {
1079 zone_ports_cmd "port_remove
" $@
1083 zone_ports_cmd "port_up
" $@
1087 zone_ports_cmd "port_down
" $@
1090 zone_ports_status() {
1091 zone_ports_cmd "port_status
" $@
1094 zone_configs_cmd() {
1101 assert zone_exists "${zone}"
1104 for config in $(zone_configs_list "${zone}"); do
1105 local config_hook="$
(zone_config_get_hook
"${zone}" "${config}")"
1106 assert isset config_hook
1108 hook_config_exec "${config_hook}" "${cmd}" "${zone}" "${config}" $@
1113 zone_configs_cmd "up
" $@
1116 zone_configs_down() {
1117 zone_configs_cmd "down
" $@
1120 zone_configs_status() {
1121 zone_configs_cmd "status
" $@
1124 zone_configs_list() {
1128 for config in $(zone_dir ${zone})/configs/*; do
1129 [ -e "${config}" ] || continue
1135 zone_config_get_new_id() {
1136 # This functions returns the next free id for a zone
1141 local zone_path=$(zone_dir ${zone})
1145 if [ ! -f ${zone_path}/configs/*.${i} ]; then
1153 zone_config_check_same_setting() {
1154 # This functions checks if a config hook
1155 # with the same setting is already configured for this zone.
1156 # Returns True when yes and False when no.
1165 # The key should be local for this function
1169 for config in $(zone_configs_list ${zone}); do
1170 # Check if the config is from the given hook, when not continue
1171 if [[ $(zone_config_get_hook "${zone}" "${config}") != ${hook} ]]; then
1174 # Get the value of the key for a given function
1175 zone_config_settings_read
"${zone}" "${config}" \
1176 --ignore-superfluous-settings "${key}"
1177 # Check if the value of the config and the passed value are eqal
1178 if [[ "${value}" == "${!key}" ]]; then
1183 return ${EXIT_FALSE}
1186 zone_config_get_hook
() {
1196 zone_config_settings_read
"${zone}" "${config}" \
1197 --ignore-superfluous-settings HOOK
1202 zone_config_hook_is_configured
() {
1203 # Checks if a zone has already at least one config with the given hook.
1204 # Returns True when yes and False when no
1211 for config
in $
(zone_configs_list
"${zone}"); do
1212 local config_hook
="$(zone_config_get_hook "${zone}" "${config}")"
1213 assert isset config_hook
1214 if [[ ${hook} == ${config_hook} ]]; then
1220 # If we get here the zone has no config with the given hook
1221 return ${EXIT_FALSE}
1224 zone_config_id_is_valid
() {
1225 # This function checks if a given id is valid for a zone
1226 # Return True when yes and false when no
1232 local zone_path
=$
(zone_dir
${zone})
1234 [ -f ${zone_path}/configs
/*.
${id} ];
1237 # This function checks if a given hid is valid for a zone
1238 # Return True when yes and false when no
1239 zone_config_hid_is_valid
() {
1245 for _hid
in $
(zone_config_list_hids
${zone}); do
1246 if [[ ${_hid} == ${hid} ]]; then
1251 return ${EXIT_FALSE}
1254 zone_config_get_hook_from_id
() {
1255 # Returns the hook for a given id
1261 for config
in $
(zone_configs_list
"${zone}"); do
1262 if [[ ${config} == *.
${id} ]]; then
1263 local config_hook
="$(zone_config_get_hook "${zone}" "${config}")"
1264 assert isset config_hook
1265 print
"${config_hook}"
1270 # If we get here the zone has no config with the given id
1271 return ${EXIT_ERROR}
1284 starting|started|stopping|stopped
)
1285 db_connection_update
${zone} ${action}
1293 device_is_up
${zone}
1300 zone_get_supported_port_hooks
() {
1303 local hook
=$
(zone_get_hook
${zone})
1305 hook_zone_ports_get_all
${hook}
1308 zone_get_supported_config_hooks
() {
1317 echo "$(zone_dir ${zone})/settings"
1320 zone_settings_read
() {
1326 if [ $# -eq 0 ] && [ -n "${HOOK_SETTINGS}" ]; then
1327 list_append args
${HOOK_SETTINGS}
1332 # Save the HOOK variable.
1333 local hook
="${HOOK}"
1335 settings_read
"$(zone_file "${zone}")" ${args}
1341 zone_settings_write
() {
1346 if function_exists
"hook_check_settings"; then
1347 list_append args
"--check=\"hook_check_settings\""
1349 list_append args
${HOOK_SETTINGS}
1351 settings_write
"$(zone_file ${zone})" ${args}
1354 zone_settings_set
() {
1362 zone_settings_read
${zone}
1364 for arg
in ${args}; do
1368 zone_settings_write
${zone}
1372 zone_settings_get
() {
1380 zone_settings_read
"${zone}" "${key}" \
1381 --ignore-superfluous-settings
1387 zone_config_settings_read
() {
1395 if [ $# -eq 0 ] && [ -n "${HOOK_CONFIG_SETTINGS}" ]; then
1396 list_append args
${HOOK_CONFIG_SETTINGS}
1401 local path
="$(zone_dir "${zone}")/configs/${config}"
1402 settings_read
"${path}" ${args}
1405 zone_config_settings_write
() {
1413 id
=$
(zone_config_get_new_id
${zone})
1414 log DEBUG
"ID for the config is: ${id}"
1418 if function_exists
"hook_check_config_settings"; then
1419 list_append args
"--check=\"hook_check_config_settings\""
1421 list_append args
${HOOK_CONFIG_SETTINGS}
1423 local path
="$(zone_dir "${zone}")/configs/${hook}.${id}"
1424 settings_write "${path}" ${args}
1427 zone_config_settings_destroy() {
1428 # This function deletes the config file for a given zone and config
1433 local path="$
(zone_dir
"${zone}")/configs
/${config}"
1435 # Check if path is valid
1436 if [ ! -f ${path} ]; then
1437 log ERROR "Path
: '${path}' is not valid
"
1438 return ${EXIT_ERROR}
1441 log DEBUG "Deleting config
file ${path}"
1445 zone_port_settings_read() {
1453 if [ $# -eq 0 ] && [ -n "${HOOK_PORT_SETTINGS}" ]; then
1454 list_append args ${HOOK_PORT_SETTINGS}
1459 local path="$
(zone_dir
"${zone}")/ports
/${port}"
1460 settings_read "${path}" ${args}
1463 zone_port_settings_write() {
1471 if function_exists "hook_check_port_settings
"; then
1472 list_append args "--check=\"hook_check_port_settings
\""
1474 list_append args ${HOOK_PORT_SETTINGS}
1476 local path="$
(zone_dir
"${zone}")/ports
/${port}"
1477 settings_write "${path}" ${args}
1480 zone_port_settings_remove() {
1486 local path="$
(zone_dir
"${zone}")/ports
/${port}"
1487 settings_remove "${path}"
1491 # This function return the color of a zone
1495 color_read "zone
" ${name}
1498 zone_get_description_title() {
1502 description_title_read $(description_format_filename "zone
" "${name}")