add smack rule
[framework/system/dlog.git] / tizen_platform_env.sh
index b8df7c1..9bf35f1 100755 (executable)
@@ -1,11 +1,13 @@
 #!/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
-       dlevel=$(cat /opt/etc/.dloglevel)
+# 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/dlog/.dloglevel)
        if [ "$dlevel" -eq "0" ]; then
                export TIZEN_DLOG_LEVEL=0
        elif [ "$dlevel" -eq "1" ]; then