diff options
author | Filipp Lepalaan <filipp@mac.com> | 2010-11-29 18:05:28 +0200 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2010-11-29 18:05:28 +0200 |
commit | e0bb9180af98961a43c15048e11475bfe8d96186 (patch) | |
tree | 9575a216f7222004a50798b891b12c775586b9d2 /netbless.sh | |
parent | 5d880fc1659d3ee1204641da68c7992385433614 (diff) | |
download | mtk-e0bb9180af98961a43c15048e11475bfe8d96186.tar.gz mtk-e0bb9180af98961a43c15048e11475bfe8d96186.tar.bz2 mtk-e0bb9180af98961a43c15048e11475bfe8d96186.zip |
better netbless, updated readme
Diffstat (limited to 'netbless.sh')
-rwxr-xr-x | netbless.sh | 14 |
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 |