[4/7] ports/zones: Add higher level function to get the description title

Submitted by Jonatan Schlag on June 19, 2017, 7:20 p.m.

Details

Message ID 1497900050-27692-4-git-send-email-jonatan.schlag@ipfire.org
State Accepted
Commit 5de34b4cd7fe99ef7faf319438a5b32d7997a496
Headers show

Commit Message

Jonatan Schlag June 19, 2017, 7:20 p.m.
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
---
 src/functions/functions.ports | 7 +++++++
 src/functions/functions.zone  | 7 +++++++
 2 files changed, 14 insertions(+)

Patch hide | download patch | download mbox

diff --git a/src/functions/functions.ports b/src/functions/functions.ports
index db4e365..1c911f1 100644
--- a/src/functions/functions.ports
+++ b/src/functions/functions.ports
@@ -430,3 +430,10 @@  port_get_color() {
 	local name=${1}
 	color_read "port" ${name}
 }
+
+port_get_description_title() {
+	assert [ $# -eq 1 ]
+
+	local name=${1}
+	description_title_read $(description_format_filename "port" "${name}")
+}
diff --git a/src/functions/functions.zone b/src/functions/functions.zone
index 058110d..fd13875 100644
--- a/src/functions/functions.zone
+++ b/src/functions/functions.zone
@@ -1208,3 +1208,10 @@  zone_get_color() {
 	local name=${1}
 	color_read "zone" ${name}
 }
+
+zone_get_description_title() {
+	assert [ $# -eq 1 ]
+
+	local name=${1}
+	description_title_read $(description_format_filename "zone" "${name}")
+}