- If service file is written in window, the unexpected result is
comming due to Carriage Return.
Change-Id: I68638dc44007f2297eab368b15e7af593cd46491
{
for line in `find "$1" -type f -name "*service" 2> /dev/null`
do
- uid=";$(cat $line | grep "User=" | grep -v "#" | cut -d "=" -f2)"
- gid=";$(cat $line | grep "Group=" | grep -v "#" | cut -d "=" -f2)"
- smacklabel=";$(cat $line | grep "SmackProcessLabel=" | grep -v "#" | cut -d "=" -f2);"
+ uid=";$(cat $line | grep "User=" | grep -v "#" | cut -d "=" -f2 | tr -d '\015')"
+ gid=";$(cat $line | grep "Group=" | grep -v "#" | cut -d "=" -f2 | tr -d '\015')"
+ smacklabel=";$(cat $line | grep "SmackProcessLabel=" | grep -v "#" | cut -d "=" -f2 | tr -d '\015');"
check_service $line $uid $gid $smacklabel $2
done