From 14d78f1b15714f8a02ade410308d5045d5a6ed68 Mon Sep 17 00:00:00 2001 From: Lukas Macura Date: Tue, 19 Apr 2016 17:38:02 +0200 Subject: [PATCH 1/2] Missed include file --- zaf | 1 + 1 file changed, 1 insertion(+) diff --git a/zaf b/zaf index c78211e..b0eb4a1 100755 --- a/zaf +++ b/zaf @@ -52,6 +52,7 @@ if [ -f ./lib/zaf.lib.sh ]; then [ -f ./lib/zaf.${ZAF_OS}.sh ] && . ./lib/zaf.${ZAF_OS}.sh else . ${ZAF_LIB_DIR}/zaf.lib.sh +. ${ZAF_LIB_DIR}/plugin.lib.sh . ${ZAF_LIB_DIR}/os.lib.sh . ${ZAF_LIB_DIR}/ctrl.lib.sh . ${ZAF_LIB_DIR}/cache.lib.sh From c0b57ea7bef1a49909cdc2ffe8804a224a915654 Mon Sep 17 00:00:00 2001 From: Lukas Macura Date: Tue, 19 Apr 2016 20:11:09 +0200 Subject: [PATCH 2/2] Repaired function name --- zaf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zaf b/zaf index b0eb4a1..75027f3 100755 --- a/zaf +++ b/zaf @@ -374,20 +374,20 @@ api) if [ -f "$ZAF_PLUGINS_DIR/$1/template.xml" ]; then template="$ZAF_PLUGINS_DIR/$1/template.xml" zaf_wrn "Importing template $template" - zaf_zbxapi_import_template $template || zaf_err "Error importing template" + zaf_zbxapi_import_config $template || zaf_err "Error importing template" else url="$(zaf_plugin_option $1 Template)" if [ -n "$url" ]; then - zaf_fetch_url $url | zaf_zbxapi_import_template || zaf_err "Error importing template" + zaf_fetch_url $url | zaf_zbxapi_import_config || zaf_err "Error importing template" else url="$(zaf_plugin_option $1 Url)" - zaf_fetch_url $url/template.xml | zaf_zbxapi_import_template || zaf_err "Error importing template" + zaf_fetch_url $url/template.xml | zaf_zbxapi_import_config || zaf_err "Error importing template" fi fi else if [ -f $1 ]; then zaf_wrn "Importing template $1" - zaf_zbxapi_import_template $1 || zaf_err "Error importing template" + zaf_zbxapi_import_config $1 || zaf_err "Error importing template" else zaf_err "Unknown plugin $1!" fi