Remove unused code (Don't use pgrep) 73/117473/1 accepted/tizen/common/20170306.165254 accepted/tizen/ivi/20170306.222710 accepted/tizen/mobile/20170306.222608 accepted/tizen/tv/20170306.222625 accepted/tizen/unified/20170309.035205 accepted/tizen/wearable/20170306.222650 submit/tizen/20170306.075427 submit/tizen_unified/20170308.100411
authorINSUN PYO <insun.pyo@samsung.com>
Mon, 6 Mar 2017 07:27:32 +0000 (16:27 +0900)
committerINSUN PYO <insun.pyo@samsung.com>
Mon, 6 Mar 2017 07:28:07 +0000 (16:28 +0900)
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: I8809374f28baae65606b679b3ef15fc71a91f98d

packaging/dbus.sh

index def8586..5f0bf73 100644 (file)
@@ -2,13 +2,14 @@
 # from the first systemd process running for the current user.
 # This typically allows a 'su - <user>' command to have the right DBUS address.
 
-if [[ -z "$DBUS_SESSION_BUS_ADDRESS" ]]; then
-   systemd_pid=$(pgrep -U $UID systemd | head -1)
-   if [[ -n "$systemd_pid" ]]; then
-      val=$(tr '\0' '\n' < /proc/${systemd_pid}/environ | sed  '/^DBUS_SESSION_BUS_ADDRESS=/!d ; s/[^=]*=//')
-      [[ -n "$val" ]] && export DBUS_SESSION_BUS_ADDRESS=$val
-   fi
-fi
+# pgrep doesn't work at tizen 4.0. Replace with the following code.
+# if [[ -z "$DBUS_SESSION_BUS_ADDRESS" ]]; then
+#    systemd_pid=$(pgrep -U $UID systemd | head -1)
+#    if [[ -n "$systemd_pid" ]]; then
+#       val=$(tr '\0' '\n' < /proc/${systemd_pid}/environ | sed  '/^DBUS_SESSION_BUS_ADDRESS=/!d ; s/[^=]*=//')
+#       [[ -n "$val" ]] && export DBUS_SESSION_BUS_ADDRESS=$val
+#    fi
+# fi
 
 
 # The adbd's privilege has been changed form "System::Privileged" to "User::Shell".