X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=usr%2Flib%2Fpkgusr%2Fchown;h=b2e1389f5f6c75c20a2793f504844c745d4dbf37;hb=8ad446d5669b34095d0c0dcb099f167339ba55d1;hp=933c4159838c5b4dc27d6b23eff9f24d5ef79a90;hpb=a9baeb490600c1e0a64cfc1e193cc6c145327c21;p=pkgusr diff --git a/usr/lib/pkgusr/chown b/usr/lib/pkgusr/chown index 933c415..b2e1389 100755 --- a/usr/lib/pkgusr/chown +++ b/usr/lib/pkgusr/chown @@ -22,7 +22,7 @@ if [ ! -n "$DAISY_CHAIN" ]; then exit 1 fi -if [ $UID == 0 ]; then +if [ $(id -u) == 0 ]; then echo 1>&2 '***' $(dirname $0) should not be in root\'s \$PATH echo 1>&2 '***' call '"'$DAISY_CHAIN $@'"' directly. exit 1 @@ -52,7 +52,7 @@ report=0 # Catch the case where USER is somebody else. if [ -n "$usr" ]; then - printf '%d' $usr &>/dev/null + printf '%d' "$usr" &>/dev/null if [ $? -eq 0 ]; then if [ $usr -ne $(id -u) ]; then report=1 @@ -67,7 +67,7 @@ fi # Catch the case where GROUP isn't in our groups. if [ -n "$grp" -a $report -eq 0 ]; then GRP_CHAIN="" - printf '%d' $grp &>/dev/null + printf '%d' "$grp" &>/dev/null if [ $? -eq 0 ]; then GRP_LIST=$(id -G) else