diff options
author | Filipp Lepalaan <filipp@mac.com> | 2010-12-10 20:52:19 +0200 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2010-12-10 20:52:19 +0200 |
commit | 673dd12fcbbd5b8def0e9eb7d6997f8a55a2d5f4 (patch) | |
tree | 53fcead6d504a9ec2f358478a6f19818143521cc | |
parent | e0bb9180af98961a43c15048e11475bfe8d96186 (diff) | |
download | mtk-673dd12fcbbd5b8def0e9eb7d6997f8a55a2d5f4.tar.gz mtk-673dd12fcbbd5b8def0e9eb7d6997f8a55a2d5f4.tar.bz2 mtk-673dd12fcbbd5b8def0e9eb7d6997f8a55a2d5f4.zip |
netbless fixes
-rwxr-xr-x | netbless.sh | 22 | ||||
-rwxr-xr-x | up2date.sh | 3 |
2 files changed, 14 insertions, 11 deletions
diff --git a/netbless.sh b/netbless.sh index dc3a9bc..c9b5ad5 100755 --- a/netbless.sh +++ b/netbless.sh @@ -4,15 +4,19 @@ # @author Filipp Lepalaan <filipp@mcare.fi> # @package mtk -SERVER=sw.mcare.fi -SERVER_PATH="/data/nb" - if [[ ${USER} != "root" ]]; then echo "This must be run as root" 2>&1 exit 1 fi -SERVER_IP=$(dig +short ${SERVER}) +if [[ $1 == "help" ]]; then + echo "Usage: $(basename $0) [nbi] [url] [nbi_path]" 2>&1 + exit 0 +fi + +SERVER_PATH=${3:-"/data/nb"} +SERVER=${2:-"http://sw.mcare.fi/mh/"} +SERVER_IP=$(/usr/bin/dig +short ${SERVER}) ME=$(/usr/sbin/sysctl -n hw.model) MACHINE=$(sysctl -n hw.machine) @@ -26,10 +30,10 @@ if [[ -z $ME ]]; then exit 1 fi -IMAGES=$(/usr/bin/curl -s http://${SERVER}/mh/) +IMAGES=$(/usr/bin/curl -s ${SERVER}) -if [[ $1 == "help" ]]; then - echo -e "Usage: $(basename $0) [${IMAGES}]" 2>&1 +if [[ $1 == "list" ]]; then + echo -e "Available images: [${IMAGES}]" 2>&1 exit 0 fi @@ -41,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 "NetBoot set to ${ME}.nbi" + --nextonly \ + echo "Startup volume set to ${ME}.nbi" exit 0 fi done @@ -1,7 +1,6 @@ #!/usr/bin/env bash # up2date.sh -# Run software update until there are no more -# updates available. +# Run software update until there are no more updates available. # @author Filipp Lepalaan # @package mtk |