From 407c3e9ccf9688279aef779f9aa46d7c2c5cdb85 Mon Sep 17 00:00:00 2001 From: roman Date: Wed, 13 Nov 2024 09:29:22 +0100 Subject: [PATCH] scripts UPDATE add ssh banner config --- CMakeLists.txt | 5 +++-- scripts/merge_config.sh | 8 ++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 003875db..2c1b3efc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,8 +49,8 @@ set(LIBYANG_DEP_SOVERSION 3.0.0) set(LIBYANG_DEP_SOVERSION_MAJOR 3) # libnetconf2 required version -set(LIBNETCONF2_DEP_VERSION 3.5.2) -set(LIBNETCONF2_DEP_SOVERSION 4.4.2) +set(LIBNETCONF2_DEP_VERSION 3.5.4) +set(LIBNETCONF2_DEP_SOVERSION 4.4.4) set(LIBNETCONF2_DEP_SOVERSION_MAJOR 4) # sysrepo required version @@ -407,6 +407,7 @@ if(SYSREPO_SETUP) message(STATUS \"Merging default server listen configuration if there is none (merge_config.sh)...\") set(ENV{SYSREPOCTL_EXECUTABLE} \"${SYSREPOCTL_EXECUTABLE}\") set(ENV{SYSREPOCFG_EXECUTABLE} \"${SYSREPOCFG_EXECUTABLE}\") + set(ENV{NP2_VERSION} \"${NP2SRV_VERSION}\") execute_process(COMMAND \"\$ENV{DESTDIR}${DATA_DIR}/scripts/merge_config.sh\" RESULT_VARIABLE CMD_RES OUTPUT_VARIABLE CMD_OUT diff --git a/scripts/merge_config.sh b/scripts/merge_config.sh index 4b476d64..eddada7d 100755 --- a/scripts/merge_config.sh +++ b/scripts/merge_config.sh @@ -62,6 +62,13 @@ if [ -n "$AUTH_CONFIG" ]; then " fi +SSH_BANNER="" +# check if the NP2_VERSION environment variable is set +if [ -n "$NP2_VERSION" ]; then + # get the banner from the NP2_VERSION environment variable + SSH_BANNER="netopeer2-netconf-server-${NP2_VERSION}" +fi + # import default config CONFIG=" @@ -74,6 +81,7 @@ CONFIG=" + ${SSH_BANNER} default-key