3 # Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
7 #parse installation options
32 if [ "`whoami`" == "root" ]
35 # TODO(t.iwanek): fix me
36 # this is workaround that will work only for 'app' user
37 # pkgmgr-server is running as root and then backend too
38 # 1) backend need to know the user
40 # 2) pkgmgr must change user before launching backend
43 # Find requesting process...
44 # (will fail for multiple installation at same time)
45 user=`ps aux | grep -v 'grep' | grep pkgcmd | cut -f1 -d" "`
47 su - ${user} -c "/usr/bin/xwalkctl ${option} ${id} ${key} ${keyvalue} ${quiet}"
49 # correct UID was set by pkgmgr
50 /usr/bin/xwalkctl ${option} ${id} ${key} ${keyvalue} ${quiet}