From b557488608908c6c0f74c5ef264dcece9cb9a5c3 Mon Sep 17 00:00:00 2001 From: Zain Budhwani <99770260+zbud-msft@users.noreply.github.com> Date: Thu, 25 Jan 2024 17:14:21 -0800 Subject: [PATCH] Remove echo log to /tmp/{$SERVICE}-debug.log in service_mgmt.sh (#17838) ### Why I did it Unnecessary for logs to be written out to /tmp/${SERVICE}-debug.log as they are already being written to syslog. Therefore, removing writing to a new log in concern for memory space and not being able to startup some services in RO state. ##### Work item tracking - Microsoft ADO **(number only)**:26458976 #### How I did it Remove DEBUGLOG definition and line that echo's message to mentioned log file. #### How to verify it Manually verified, /tmp/${SERVICE}-debug.log files do not exist and log for service starting still appears in syslog --- files/scripts/service_mgmt.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/files/scripts/service_mgmt.sh b/files/scripts/service_mgmt.sh index a3709bf2bf..6a038c0a35 100755 --- a/files/scripts/service_mgmt.sh +++ b/files/scripts/service_mgmt.sh @@ -3,7 +3,6 @@ function debug() { /usr/bin/logger $1 - /bin/echo `date` "- $1" >> ${DEBUGLOG} } function check_warm_boot() @@ -87,7 +86,6 @@ DEV=$2 SCRIPT_NAME=$(basename -- "$0") SERVICE="${SCRIPT_NAME%.*}" -DEBUGLOG="/tmp/$SERVICE-debug$DEV.log" NAMESPACE_PREFIX="asic" if [ "$DEV" ]; then NET_NS="$NAMESPACE_PREFIX$DEV" #name of the network namespace