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
This commit is contained in:
Zain Budhwani 2024-01-25 17:14:21 -08:00 committed by GitHub
parent fb2c3cdf14
commit b557488608
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,7 +3,6 @@
function debug() function debug()
{ {
/usr/bin/logger $1 /usr/bin/logger $1
/bin/echo `date` "- $1" >> ${DEBUGLOG}
} }
function check_warm_boot() function check_warm_boot()
@ -87,7 +86,6 @@ DEV=$2
SCRIPT_NAME=$(basename -- "$0") SCRIPT_NAME=$(basename -- "$0")
SERVICE="${SCRIPT_NAME%.*}" SERVICE="${SCRIPT_NAME%.*}"
DEBUGLOG="/tmp/$SERVICE-debug$DEV.log"
NAMESPACE_PREFIX="asic" NAMESPACE_PREFIX="asic"
if [ "$DEV" ]; then if [ "$DEV" ]; then
NET_NS="$NAMESPACE_PREFIX$DEV" #name of the network namespace NET_NS="$NAMESPACE_PREFIX$DEV" #name of the network namespace