[Fuego] [PATCH] Add function get_service_logfile.

Wang Mingyu <[email protected]>
Newsgroups dev.linux.lists.fuego
Message-ID <[email protected]>
Set the logfile of service according to the init system.

Signed-off-by: Wang Mingyu <[email protected]>
---
 scripts/fuego_board_function_lib.sh | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/scripts/fuego_board_function_lib.sh b/scripts/fuego_board_function_lib.sh
index 1b8699a..a6cd842 100644
--- a/scripts/fuego_board_function_lib.sh
+++ b/scripts/fuego_board_function_lib.sh
@@ -87,3 +87,16 @@ get_service_status() {
     fi
     echo $service_status
 }
+
+# get_service_logfile:
+#  get logfile of service
+# returns: logfile of service
+get_service_logfile() {
+    if [ "$init_manager" = "systemd" ]
+    then
+        service_logfile="/var/log/syslog"
+    else
+        service_logfile="/var/log/messages"
+    fi
+    echo $service_logfile
+}
-- 
2.17.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.