From 5980c6020a7aaac802d3a46a6c433efeec5f034c Mon Sep 17 00:00:00 2001 From: Murat Ursavas Date: Mon, 6 Feb 2023 11:14:10 +0300 Subject: [PATCH] Made FREQ parameter optional. --- setenv_pktfwd.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/setenv_pktfwd.sh b/setenv_pktfwd.sh index f9fa335..9cf97ec 100755 --- a/setenv_pktfwd.sh +++ b/setenv_pktfwd.sh @@ -42,10 +42,14 @@ else success_variant=1 fi -if [[ $success_freq != 1 || $success_variant != 1 ]]; then - echo "Error: Not all required parameters have been set. Container will be reset after 5 sec." - sleep 5 # sleep for some time before exiting and make the container restart. This would give diagnostics a chance to create necessary data +if [[ $success_variant != 1 ]]; then + echo "Error: Required VARIANT parameter has not been set. Container will be reset after 10 sec." + sleep 10 # sleep for some time before exiting and make the container restart. This would give diagnostics a chance to create necessary data exit 1 fi +if [[ $success_freq != 1 ]]; then + echo "Warning: FREQ is not set for the device." +fi + echo "All required environment variables have been set."