From 74fc46a3d54022ebceb5d9d5d114c3e9e16475d4 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Mon, 12 Nov 2018 12:02:01 +0100 Subject: [PATCH] TT#43700 Set new NGCPCFG_RUNNING environment variable This will make it possible for child processes to check whether they are being executed from ngcpcfg, for example to avoid recursion. Change-Id: I8f51dd7872c458b8c3214be4bc9a4ab133b3e441 --- sbin/ngcpcfg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sbin/ngcpcfg b/sbin/ngcpcfg index 3c4d91f9..cd794cda 100755 --- a/sbin/ngcpcfg +++ b/sbin/ngcpcfg @@ -10,6 +10,9 @@ if [ "$UID" -ne 0 ] ; then exit 1 fi +# Notify subprocesses we are running. +export NGCPCFG_RUNNING=1 + # support for testsuite FUNCTIONS="${FUNCTIONS:-/usr/share/ngcp-ngcpcfg/functions/}" SCRIPTS="${SCRIPTS:-/usr/share/ngcp-ngcpcfg/scripts/}"