aboutsummaryrefslogtreecommitdiffstats
path: root/netbless.sh
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2011-04-04 15:36:26 +0300
committerFilipp Lepalaan <filipp@mac.com>2011-04-04 15:36:26 +0300
commit6dff30e12a9cf14c51675b35a519d1980a0f3ce1 (patch)
tree6b1a4f9822b8d77cb70d571e7b7c799f2e76196f /netbless.sh
parente88df52f6c6509bbb422b18fa1e460199512eda0 (diff)
downloadmtk-6dff30e12a9cf14c51675b35a519d1980a0f3ce1.tar.gz
mtk-6dff30e12a9cf14c51675b35a519d1980a0f3ce1.tar.bz2
mtk-6dff30e12a9cf14c51675b35a519d1980a0f3ce1.zip
Added whatbuild
Diffstat (limited to 'netbless.sh')
-rwxr-xr-xnetbless.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/netbless.sh b/netbless.sh
index 934a975..b604cf2 100755
--- a/netbless.sh
+++ b/netbless.sh
@@ -14,26 +14,27 @@ if [[ $1 == "help" ]]; then
exit 0
fi
-SERVER_PATH=${3:-"/data/nb"}
SERVER=${2:-"sw.mcare.fi"}
+SERVER_PATH=${3:-"/data/nb"}
SERVER_IP=$(/usr/bin/dig +short ${SERVER})
-ME=${1:-$(/usr/sbin/sysctl -n hw.model)}
MACHINE=$(sysctl -n hw.machine)
if [[ $MACHINE == "x86_64" ]]; then
MACHINE="i386/${MACHINE}"
fi
+ME=${1:-$(/usr/sbin/sysctl -n hw.model)}
+
if [[ -z $ME ]]; then
echo "Error: could not determine hardware model" 2>&1
exit 1
fi
-IMAGES=$(/usr/bin/curl -s http://${SERVER}/mh/)
+IMAGES=$(/usr/bin/curl -s "http://${SERVER}/mh/")
if [[ $1 == "list" ]]; then
- echo -e "Available images: [${IMAGES}]" 2>&1
+ echo -e "Available images: ${IMAGES}" 2>&1
exit 0
fi