[VOL-2426] : Write dev_mgmt_daemon logs into its own file instead of syslog
Change-Id: Id69d6a16d40a8ed8c3a83a5aceccf718ede4f7a2
diff --git a/agent/scripts/init.d/dev_mgmt_daemon b/agent/scripts/init.d/dev_mgmt_daemon
index 9e5a5a3..5eba28c 100755
--- a/agent/scripts/init.d/dev_mgmt_daemon
+++ b/agent/scripts/init.d/dev_mgmt_daemon
@@ -1,7 +1,7 @@
#!/bin/sh
### BEGIN INIT INFO
-# Provides: bal_core_dist
+# Provides: dev_mgmt_daemon
# Required-Start: $local_fs $network $syslog
# Required-Stop: $network $local_fs $syslog
# Default-Start: 2 3 4 5
@@ -14,7 +14,7 @@
PATH="/broadcom:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
APPDIR="/broadcom"
APPBIN="dev_mgmt_daemon"
-APPARGS="-pcie -syslog"
+APPARGS="-pcie -d"
PID_FILE="root_dev_mgmt_pid"
USER="root"
GROUP="root"
@@ -27,8 +27,9 @@
/opt/bcm68620/svk_init.sh
sleep 10
printf "Starting '$NAME'... "
+ touch /var/log/$NAME.log
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$APPDIR
- start-stop-daemon --verbose --start --chuid "$USER:$GROUP" --background --no-close --chdir "$APPDIR" --exec "$APPBIN" -- $APPARGS 2>&1 || true
+ start-stop-daemon --verbose --start --chuid "$USER:$GROUP" --background --no-close --chdir "$APPDIR" --exec "$APPBIN" -- $APPARGS < /dev/tty1 >> /var/log/$NAME.log 2>&1 || true
printf "done\n"
}