[Fuego] [PATCH] Add function get_service_logfile.

Wang Mingyu wangmy at cn.fujitsu.com
Wed Oct 16 08:06:13 UTC 2019


Set the logfile of service according to the init system.

Signed-off-by: Wang Mingyu <wangmy at cn.fujitsu.com>
---
 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





More information about the Fuego mailing list