summaryrefslogtreecommitdiffstats
path: root/initramfs/stage3-stuff/etc/functions
diff options
context:
space:
mode:
authorSebastian Schmelzer2008-10-01 18:49:16 +0200
committerSebastian Schmelzer2008-10-01 18:49:16 +0200
commit847e753a0c86057a8d7f3629942591c332ebd060 (patch)
tree5c0c5f92879b597df10bb461abfd60e871636e15 /initramfs/stage3-stuff/etc/functions
parent * /var/lib/nfs/sm.bak is required by nfs (diff)
downloadcore-847e753a0c86057a8d7f3629942591c332ebd060.tar.gz
core-847e753a0c86057a8d7f3629942591c332ebd060.tar.xz
core-847e753a0c86057a8d7f3629942591c332ebd060.zip
* tftp_get is now more silent..
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2261 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs/stage3-stuff/etc/functions')
-rw-r--r--initramfs/stage3-stuff/etc/functions19
1 files changed, 11 insertions, 8 deletions
diff --git a/initramfs/stage3-stuff/etc/functions b/initramfs/stage3-stuff/etc/functions
index e71a9815..9b26eaa4 100644
--- a/initramfs/stage3-stuff/etc/functions
+++ b/initramfs/stage3-stuff/etc/functions
@@ -304,25 +304,28 @@ tftp_get () {
local download_successful=0
local countdown="$3"
- [ -z "$1" -o -z "$2" ] && \
- echo "[tftp_get] Usage: tftp_get <path> <server> [count]" &&
+ if [ -z "$1" -o -z "$2" ]; then
+ [ $DEBUGLEVEL -ge 1 ] && \
+ echo "[tftp_get] Usage: tftp_get <path> <server> [count]"
return 1;
+ fi
[ "$countdown" = "" ] && countdown=3
- echo "[tftp_get] trying to get \"$file\" from \"$file_server\"..."
-
until [ $download_successful -eq 1 ]
do
- [ "$countdown" = "0" ] && echo "[tftp_get] ..failed!" && return 0;
+ if [ "$countdown" = "0" ]; then
+ [ $DEBUGLEVEL -ge 1 ] && \
+ echo "[tftp_get] failed to get \"$file\" from \"$file_server\" !"
+ return 0;
+ fi
tftp -g -r $file -l /tmp/$(basename $file) $file_server
[ -s /tmp/$(basename $file) ] && download_successful=1
countdown=`expr $countdown - 1`
usleep 200000
- ! [ "$countdown" = "0" ] && [ $download_successful -eq 0 ] && \
- echo "[tftp_get] retry.."
done
- echo "[tftp_get] ..successful!"
+ [ $DEBUGLEVEL -ge 1 ] && \
+ echo "[tftp_get] download of \"$file\" from \"$file_server\" successful!"
return 0;
}