From 5bf49743a6e0f1c79606da6af3ed00bc7629b8f3 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 16 Jan 2009 14:51:52 -0800 Subject: [PATCH] Add minor root check for convenience --- scripts/zpool-create.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/zpool-create.sh b/scripts/zpool-create.sh index e46b02cdda..4b8e3a8bf2 100755 --- a/scripts/zpool-create.sh +++ b/scripts/zpool-create.sh @@ -62,6 +62,10 @@ while getopts 'hvc:p:' OPTION; do esac done +if [ $(id -u) != 0 ]; then + die "Must run as root" +fi + check_config || die "${ERROR}" . ${ZPOOL_CONFIG}