/*
*By Neil Chiao ( neilchiao at gmail.com )
*From ( neilengineer.cublog.cn )
*/
#!/bin/bash
#The first way
case `id -u` in
0)
;;
*)
echo "gnome-xgl-switch must be run as root" 1>&2
exit 1
;;
esac
#Another way
if [ "$(id -un)" != "root" ]; then
echo "This script has to be run by root, quit now"
exit
fi
阅读(604) | 评论(0) | 转发(0) |