diff options
author | Jim Meyering <jim@meyering.net> | 2001-08-06 09:50:05 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2001-08-06 09:50:05 +0000 |
commit | 11b02c5e135c32fa8dbae463b50ed8db10e103ad (patch) | |
tree | 95c9d564d09b476a7142b0eb20e022830fd4ebad | |
parent | 0324f0f18b073a1d72d9be4bb3b797bdf65d1659 (diff) | |
download | coreutils-11b02c5e135c32fa8dbae463b50ed8db10e103ad.tar.xz |
finally make it work
-rw-r--r-- | tests/priv-check | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/priv-check b/tests/priv-check index 786a4a591..4b95f860f 100644 --- a/tests/priv-check +++ b/tests/priv-check @@ -12,7 +12,17 @@ priv_check_temp=priv-check.$$ touch $priv_check_temp || framework_failure=1 chmod a-w $priv_check_temp || framework_failure=1 -(echo foo >> $priv_check_temp) >/dev/null 2>&1 || { +(echo foo >> $priv_check_temp) >/dev/null 2>&1 +overwrite_status=$? +give_msg=no +case $1:$overwrite_status in + require-root:0) ;; + require-root:*) give_msg=yes ;; + require-non-root:0) give_msg=yes ;; + require-non-root:*) ;; +esac + +test $give_msg = yes && { cat <<EOF *************************** NOTICE: |