From e4bd3b3670a8bd9f5dd3cbb438e994911a810635 Mon Sep 17 00:00:00 2001 From: Michael Janczyk Date: Tue, 17 Jun 2008 14:40:13 +0000 Subject: back to other solution of ticket #232, since pattern matching has to be changed too for this solution. git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1884 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/initrd-stuff/etc/functions | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'initramfs/initrd-stuff/etc/functions') diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions index 0d9e20a2..a142f5f2 100644 --- a/initramfs/initrd-stuff/etc/functions +++ b/initramfs/initrd-stuff/etc/functions @@ -93,10 +93,16 @@ else rest="$var" prot="" fi +# remove temporary '::' from path, since it conflicts with port specification +if strinstr "::" "$rest" ; then + rest=$(echo $rest | sed -e 's,::,§§§§§,g') +elif strinstr "\:\:" "$rest" ; then + rest=$(echo $rest | sed -e 's,\:\:,§§§§§,g') +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 (fixme: port might be broken) -if echo "$rest" grep -e "[0-9,a-z]:[0-9]" >/dev/null 2>&1; then +if strinstr ":" "$rest" ; then server="${rest%:*}" rest="${rest#*:}" path="${rest#*/}" @@ -117,7 +123,8 @@ fi case "$2" in prot) echo "$prot" ;; server) echo "$server" ;; - path) echo "$path" ;; + # add '::' again to path + path) echo "$path" | sed -e 's,§§§§§,\:\:,g' ;; port) echo "$port" ;; query) echo "$query" ;; esac -- cgit v1.2.3-55-g7522