change set the platformlogging mode on method in tizen-debug-level.service
authorjuho <juho80.son@samsung.com>
Wed, 17 Apr 2013 07:29:09 +0000 (16:29 +0900)
committerjuho <juho80.son@samsung.com>
Wed, 17 Apr 2013 07:29:14 +0000 (16:29 +0900)
Change-Id: I660e550e1cf79192297fcdaf1594699e98080db6

dlogctrl
packaging/tizen-debug-level.service

index 169527d..70751e7 100755 (executable)
--- a/dlogctrl
+++ b/dlogctrl
@@ -45,6 +45,7 @@ if [ "$MODE" = "set" ]; then
        elif [ "$OBJ" = "platformlog" ] && [ "$VAL" = "0" ] ; then
                rm -f /opt/etc/dlog/.platformloggingmode 2>/dev/null
        fi
+    echo "You must reboot this target to apply the change!"
 else
        if [ "$OBJ" = "platformlog" ]; then
                if [ -e "/opt/etc/dlog/.platformloggingmode" ]; then
@@ -53,7 +54,6 @@ else
                        echo 0
                fi
        fi
-    echo "You must reboot this target to apply the change!"
 fi
 
 exit 0
index 563de1e..9917ef5 100644 (file)
@@ -7,7 +7,7 @@ ConditionFileExists=/opt/etc/dlog/.platformloggingmode
 
 [Service]
 Type=oneshot
-ExecStart=/bin/sh -c '/usr/bin/systemctl set-environment TIZEN_PLATFORMLOGGING_MODE=1 TIZEN_DLOG_LEVEL=$(cat /opt/etc/dlog/.dloglevel)'
+ExecStart=/bin/sh -c '/usr/bin/systemctl set-environment TIZEN_PLATFORMLOGGING_MODE=$(find /opt/etc/dlog/.platformloggingmode -type f 2>&1 | wc -l) TIZEN_DLOG_LEVEL=$(cat /opt/etc/dlog/.dloglevel)'
 
 [Install]
 WantedBy=basic.target