X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=virt-what.in;h=3feeb6084fc1daede5f7d83c9861253d25965d95;hb=f82984fb84e9fed84aa71a50a1bfdfdc356771bd;hp=1532b9087cc180108b4c2981d7753c37c697d028;hpb=6382ef1cb5b8c146bfd35912730dccd68ab4b71a;p=virt-what.git diff --git a/virt-what.in b/virt-what.in index 1532b90..3feeb60 100644 --- a/virt-what.in +++ b/virt-what.in @@ -74,8 +74,9 @@ exec_prefix=@exec_prefix@ PATH="${root}@libexecdir@:${root}/sbin:${root}/usr/sbin:${PATH}" # Check we're running as root. +EFFUID=$(id -u) || fail "failed to get current user id" -if [ "x$root" = "x" ] && [ "$EUID" -ne 0 ]; then +if [ "x$root" = "x" ] && [ "$EFFUID" -ne 0 ]; then fail "this script must be run as root" fi