aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2011-05-10 18:48:24 +0300
committerFilipp Lepalaan <filipp@mac.com>2011-05-10 18:48:24 +0300
commitb74a04eedaeba86926953e346754814e1f956a62 (patch)
treef8d7f3d173888f300cff82d3dee2270365be12ce
parenta1531de87130993a90e6086e9da85733a85e1dc1 (diff)
downloadmtk-b74a04eedaeba86926953e346754814e1f956a62.tar.gz
mtk-b74a04eedaeba86926953e346754814e1f956a62.tar.bz2
mtk-b74a04eedaeba86926953e346754814e1f956a62.zip
Added check for DS
-rwxr-xr-xnetbless.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/netbless.sh b/netbless.sh
index b604cf2..8491990 100755
--- a/netbless.sh
+++ b/netbless.sh
@@ -4,7 +4,7 @@
# @author Filipp Lepalaan <filipp@mcare.fi>
# @package mtk
-if [[ ${USER} != "root" ]]; then
+if [[ ${USER} != "root" && -z ${DS_USER_LOGIN} ]]; then
echo "This must be run as root" 2>&1
exit 1
fi
@@ -26,7 +26,7 @@ fi
ME=${1:-$(/usr/sbin/sysctl -n hw.model)}
-if [[ -z $ME ]]; then
+if [[ -z ${ME} ]]; then
echo "Error: could not determine hardware model" 2>&1
exit 1
fi