summaryrefslogtreecommitdiffstats
path: root/initramfs/stage3-stuff/etc/functions
diff options
context:
space:
mode:
authorSebastian Schmelzer2008-09-24 18:12:44 +0200
committerSebastian Schmelzer2008-09-24 18:12:44 +0200
commit103b908324461b05c5489055c68dfa03bc81a9be (patch)
treef42b5a56f35e5a4c415635d500d61c0508b3fe1c /initramfs/stage3-stuff/etc/functions
parent * added tftp wrapper function (diff)
downloadcore-103b908324461b05c5489055c68dfa03bc81a9be.tar.gz
core-103b908324461b05c5489055c68dfa03bc81a9be.tar.xz
core-103b908324461b05c5489055c68dfa03bc81a9be.zip
* minor fixes
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2243 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs/stage3-stuff/etc/functions')
-rw-r--r--initramfs/stage3-stuff/etc/functions8
1 files changed, 4 insertions, 4 deletions
diff --git a/initramfs/stage3-stuff/etc/functions b/initramfs/stage3-stuff/etc/functions
index 481ccf54..a0f1c6c5 100644
--- a/initramfs/stage3-stuff/etc/functions
+++ b/initramfs/stage3-stuff/etc/functions
@@ -298,7 +298,7 @@ fi
# tftp wrapper
# usage tftp_get <path> <tftpdserver> [count]
# count is optional - default is 3 - use -1 for indefinit
-function tftp_get () {
+tftp_get () {
local file="$1"
local file_server="$2"
local download_successfull=false
@@ -306,7 +306,7 @@ function tftp_get () {
[ -z "$1" -o -z "$2" ] && \
echo "Usage: tftp_get <path> <server> [count]" &&
- exit 0;
+ return 0;
[ "$countdown" = "" ] && countdown=3
@@ -317,8 +317,8 @@ function tftp_get () {
[ "$countdown" = "0" ] && return 0;
tftp -g -r $file -l /tmp/$(basename $file) $file_server
[ -s /tmp/$(basename $file) ] && download_successfull=true
- (( countdown-- ))
- sleep 0.2
+ countdown=`expr $countdown - 1`
+ usleep 200000
! [ "$countdown" = "0" ] && [ $download_successfull ] && \
echo "retry.."
done