From 3fce94d2d059975ddde2db4d5f274bab84f8ec6c Mon Sep 17 00:00:00 2001 From: Michael Janczyk Date: Thu, 17 Aug 2006 15:19:54 +0000 Subject: (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 --- initrd/initrd-stuff/etc/functions | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'initrd/initrd-stuff/etc/functions') 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 , 15-08-2006 +# Author(s): Dirk von Suchodoletz , 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 -- cgit v1.2.3-55-g7522