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
|
elif [ $1 -eq 2 ]; then
|
||||||
pl_path=$pl2_path
|
pl_path=$pl2_path
|
||||||
fi
|
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
|
else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue