aboutsummaryrefslogtreecommitdiffstats
path: root/netbless.sh
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2010-11-29 18:05:28 +0200
committerFilipp Lepalaan <filipp@mac.com>2010-11-29 18:05:28 +0200
commite0bb9180af98961a43c15048e11475bfe8d96186 (patch)
tree9575a216f7222004a50798b891b12c775586b9d2 /netbless.sh
parent5d880fc1659d3ee1204641da68c7992385433614 (diff)
downloadmtk-e0bb9180af98961a43c15048e11475bfe8d96186.tar.gz
mtk-e0bb9180af98961a43c15048e11475bfe8d96186.tar.bz2
mtk-e0bb9180af98961a43c15048e11475bfe8d96186.zip
better netbless, updated readme
Diffstat (limited to 'netbless.sh')
-rwxr-xr-xnetbless.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/netbless.sh b/netbless.sh
index 45bcbc0..dc3a9bc 100755
--- a/netbless.sh
+++ b/netbless.sh
@@ -1,4 +1,8 @@
#!/usr/bin/env bash
+# netbless.sh
+# Select NetBoot set from server
+# @author Filipp Lepalaan <filipp@mcare.fi>
+# @package mtk
SERVER=sw.mcare.fi
SERVER_PATH="/data/nb"
@@ -13,7 +17,11 @@ SERVER_IP=$(dig +short ${SERVER})
ME=$(/usr/sbin/sysctl -n hw.model)
MACHINE=$(sysctl -n hw.machine)
-if [[ -z ${ME} ]]; then
+if [[ $MACHINE == "x86_64" ]]; then
+ MACHINE="i386/${MACHINE}"
+fi
+
+if [[ -z $ME ]]; then
echo "Error: could not determine hardware model" 2>&1
exit 1
fi
@@ -32,9 +40,9 @@ do
/usr/sbin/bless --netboot \
--booter tftp://${SERVER_IP}/${IMG}/${MACHINE}/booter \
--kernel tftp://${SERVER_IP}/${IMG}/${MACHINE}/mach.macosx \
- --options "rp=nfs:${SERVER_IP}:${SERVER_PATH}:/${IMG}/NetInstall.dmg"
+ --options "rp=nfs:${SERVER_IP}:${SERVER_PATH}:/${IMG}/NetInstall.dmg" \
--nextonly
- echo "NetBoot set"
+ echo "NetBoot set to ${ME}.nbi"
exit 0
fi
done