From 5de34b4cd7fe99ef7faf319438a5b32d7997a496 Mon Sep 17 00:00:00 2001 From: Jonatan Schlag Date: Mon, 19 Jun 2017 21:20:47 +0200 Subject: [PATCH] ports/zones: Add higher level function to get the description title Signed-off-by: Jonatan Schlag Signed-off-by: Michael Tremer --- src/functions/functions.ports | 7 +++++++ src/functions/functions.zone | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/functions/functions.ports b/src/functions/functions.ports index db4e3655..1c911f11 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 058110d0..fd13875f 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}") +} -- 2.47.3