__package_pip: always use su for runas parameter.

This commit is contained in:
Darko Poljak 2016-04-21 08:24:47 +02:00
parent f24d264480
commit 66c2e16a24
1 changed files with 5 additions and 6 deletions

View File

@ -45,24 +45,23 @@ runasparam="$__object/parameter/runas"
if [ -f "$runasparam" ] if [ -f "$runasparam" ]
then then
runas=$(cat "$runasparam") runas=$(cat "$runasparam")
runas_cmd=$(cat "$__global/explorer/sucmd")
else else
runas_cmd="" runas=""
fi fi
case "$state_should" in case "$state_should" in
present) present)
if [ "$runas_cmd" ] if [ "$runas" ]
then then
echo "$runas_cmd $runas \"$pip install -q $name\"" echo "su -c \"$pip install -q $name\" $runas"
else else
echo $pip install -q "$name" echo $pip install -q "$name"
fi fi
;; ;;
absent) absent)
if [ "$runas_cmd" ] if [ "$runas" ]
then then
echo "$runas_cmd $runas \"$pip uninstall -q -y $name\"" echo "su -c \"$pip uninstall -q -y $name\" $runas"
else else
echo $pip uninstall -q -y "$name" echo $pip uninstall -q -y "$name"
fi fi