summaryrefslogtreecommitdiffstats
path: root/initrd/initrd-stuff/etc/functions
diff options
context:
space:
mode:
authorMichael Janczyk2006-08-17 17:19:54 +0200
committerMichael Janczyk2006-08-17 17:19:54 +0200
commit3fce94d2d059975ddde2db4d5f274bab84f8ec6c (patch)
tree5cf01643af631a2e676d4b111ec3b7e4f70b45b4 /initrd/initrd-stuff/etc/functions
parent* added all vendor_os-related functions to DB-interface and (diff)
downloadcore-3fce94d2d059975ddde2db4d5f274bab84f8ec6c.tar.gz
core-3fce94d2d059975ddde2db4d5f274bab84f8ec6c.tar.xz
core-3fce94d2d059975ddde2db4d5f274bab84f8ec6c.zip
(partly) fixed uri_token function (file=tftp://... should work now), do
not delete fileget result in tmp in debuglevels greater 2. git-svn-id: http://svn.openslx.org/svn/openslx/trunk@306 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd/initrd-stuff/etc/functions')
-rw-r--r--initrd/initrd-stuff/etc/functions14
1 files changed, 8 insertions, 6 deletions
diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions
index f2dfe06f..cc1694b0 100644
--- a/initrd/initrd-stuff/etc/functions
+++ b/initrd/initrd-stuff/etc/functions
@@ -2,13 +2,14 @@
# linux diskless clients (included by init, hwautocfg,
# servconfig, ... within initial ramdisk)
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 15-08-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 17-08-2006
# Felix Endres, 30-04-2006
# Tobias Maier
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
+# (c) 2006 - OpenSLX.ORG Project
#
-# Version: 0.5.1a
+# Version: 0.5.1b
#######################################################################
# set of empty dummy functions (loaded before real functions in the
@@ -127,16 +128,17 @@ else
fi
# get the server IP or name and port - URI authority
# you get the path or other token without leading "/" - add it later if
-# needed
+# needed (fixme: port might be broken)
if strinstr ":" "$rest" ; then
server="${rest%:*}"
rest="${rest#*:}"
path="${rest#*/}"
port="${rest%/$path}"
else
- server="${rest%/*}"
+ tmpval=$rest
rest="${rest#*/}"
- path="${rest#*/}"
+ server="${tmpval%/*}"
+ path="${tmpval#*/}"
port=""
fi
# get path and query components - URI path, query
@@ -372,7 +374,7 @@ esac
# unpack part (only gzip is supported)
if [ -s $dst ] ; then
tar -xpzf $dst
- rm $dst
+ [ "$DEBUGLEVEL" -le 2 ] && rm $dst
return 0
else
return 1