diff options
author | Filipp Lepalaan <filipp@mac.com> | 2010-12-15 13:09:10 +0200 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2010-12-15 13:09:10 +0200 |
commit | 5e8fac29dae670a4d83a67d4394b9d7cb46afdb9 (patch) | |
tree | d2917b391230af67c41b2107c2e2191c5e3d228a /netbless.sh | |
parent | 673dd12fcbbd5b8def0e9eb7d6997f8a55a2d5f4 (diff) | |
download | mtk-5e8fac29dae670a4d83a67d4394b9d7cb46afdb9.tar.gz mtk-5e8fac29dae670a4d83a67d4394b9d7cb46afdb9.tar.bz2 mtk-5e8fac29dae670a4d83a67d4394b9d7cb46afdb9.zip |
better netbless
Diffstat (limited to 'netbless.sh')
-rwxr-xr-x | netbless.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/netbless.sh b/netbless.sh index c9b5ad5..934a975 100755 --- a/netbless.sh +++ b/netbless.sh @@ -15,10 +15,10 @@ if [[ $1 == "help" ]]; then fi SERVER_PATH=${3:-"/data/nb"} -SERVER=${2:-"http://sw.mcare.fi/mh/"} +SERVER=${2:-"sw.mcare.fi"} SERVER_IP=$(/usr/bin/dig +short ${SERVER}) -ME=$(/usr/sbin/sysctl -n hw.model) +ME=${1:-$(/usr/sbin/sysctl -n hw.model)} MACHINE=$(sysctl -n hw.machine) if [[ $MACHINE == "x86_64" ]]; then @@ -30,7 +30,7 @@ if [[ -z $ME ]]; then exit 1 fi -IMAGES=$(/usr/bin/curl -s ${SERVER}) +IMAGES=$(/usr/bin/curl -s http://${SERVER}/mh/) if [[ $1 == "list" ]]; then echo -e "Available images: [${IMAGES}]" 2>&1 @@ -45,8 +45,8 @@ do --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" \ - --nextonly \ - echo "Startup volume set to ${ME}.nbi" + --nextonly + echo "Startup volume set to ${ME}" exit 0 fi done |