Upstream version 10.38.222.0
[platform/framework/web/crosswalk.git] / src / xwalk / application / tools / tizen / xwalk_backend_wrapper.sh
index 48aa919..b6f0b2c 100644 (file)
@@ -22,29 +22,16 @@ do
               keyvalue="$2"
               shift
               ;;
-        "-r") echo "Reinstall not supported"
-              exit 128 # ErrorNotSupportRDSUpdate == 128
-              ;; #TODO(t.iwanek) fix me - sending signals for reinstall option
+        "-r") option="-r"
+              id="$2"
+              ;;
     esac
     shift
 done
 
 if [ "`whoami`" == "root" ]
 then
-    #
-    # TODO(t.iwanek): fix me
-    # this is workaround that will work only for 'app' user
-    # pkgmgr-server is running as root and then backend too
-    # 1) backend need to know the user
-    #  or
-    # 2) pkgmgr must change user before launching backend
-    #
-
-    # Find requesting process...
-    #  (will fail for multiple installation at same time)
-    user=`ps aux | grep -v 'grep' | grep pkgcmd | cut -f1 -d" "`
-
-    su - ${user} -c "/usr/bin/xwalkctl ${option} ${id} ${key} ${keyvalue} ${quiet}"
+       exit 1
 else
     # correct UID was set by pkgmgr
     /usr/bin/xwalkctl ${option} ${id} ${key} ${keyvalue} ${quiet}