modified for systemd journal support
[framework/system/dlog.git] / tizen_platform_env.sh
index b8df7c1..f8f0fe0 100755 (executable)
@@ -1,10 +1,12 @@
 #!/bin/sh
 
-if [ -e "/opt/etc/dlog/.platformloggingon" ]; then
+if [ -e "/opt/etc/dlog/.platformloggingmode" ]; then
        export TIZEN_PLATFORMLOGGING_MODE=1
 fi
 
-if [ "$TIZEN_PLATFORMLOGGING_MODE" -eq "1"]; then
+# I'm not clear why "-a" doesn't work here
+if [ "x$TIZEN_PLATFORMLOGGING_MODE" != "x" ] &&
+       [ "$TIZEN_PLATFORMLOGGING_MODE" -eq "1" ]; then
        dlevel=$(cat /opt/etc/.dloglevel)
        if [ "$dlevel" -eq "0" ]; then
                export TIZEN_DLOG_LEVEL=0