Wrap echo output in bash shell so sudo works
This commit is contained in:
parent
e5e29d5c8d
commit
ba77bdcfa3
|
@ -98,7 +98,11 @@ set_pl () {
|
|||
elif [ $1 -eq 2 ]; then
|
||||
pl_path=$pl2_path
|
||||
fi
|
||||
echo $(w_to_uw $2) > $pl_path
|
||||
if [ "$EUID" -eq 0 ]; then
|
||||
echo $(w_to_uw $2) > $pl_path
|
||||
else
|
||||
sudo bash -c "echo $(w_to_uw $2) > ${pl_path}"
|
||||
fi
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue