summaryrefslogtreecommitdiffstats
path: root/initramfs/initrd-stuff/etc/functions
diff options
context:
space:
mode:
authorDirk von Suchodoletz2007-07-19 19:22:19 +0200
committerDirk von Suchodoletz2007-07-19 19:22:19 +0200
commit76844afa5692effee6d167ebf21e80e37b30f1ee (patch)
tree0730373e4db8b702f34d38711285296d8974994e /initramfs/initrd-stuff/etc/functions
parentRewrite of tftp fileget - should be possible to use other servers than (diff)
downloadcore-76844afa5692effee6d167ebf21e80e37b30f1ee.tar.gz
core-76844afa5692effee6d167ebf21e80e37b30f1ee.tar.xz
core-76844afa5692effee6d167ebf21e80e37b30f1ee.zip
Repaired uri_token function (no prepend of leading slash is required any
more) git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1258 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs/initrd-stuff/etc/functions')
-rw-r--r--initramfs/initrd-stuff/etc/functions16
1 files changed, 8 insertions, 8 deletions
diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions
index 99d06fe6..7c91391c 100644
--- a/initramfs/initrd-stuff/etc/functions
+++ b/initramfs/initrd-stuff/etc/functions
@@ -104,8 +104,8 @@ if strinstr ":" "$rest" ; then
else
tmpval=$rest
rest="${rest#*/}"
- path="${tmpval#*/}"
- server="${tmpval%/$path}"
+ server="$(echo $tmpval|sed 's,/.*,,')"
+ path="${tmpval#${server}}"
port=""
fi
# get path and query components - URI path, query
@@ -350,7 +350,7 @@ local cfgfile
echo "$fileprot $filepath $filepath" > /tmp/fileblub
[ "x$fileprot" = "x" ] && fileprot=tftp
if [ "x$filepath" != "x" ] ; then
- cfgfile=/${filepath}
+ cfgfile=${filepath}
[ "x$fileserv" = "x" ] && fileserv=$(checkip ${serverip})
case "$fileprot" in
ftp|http)
@@ -358,8 +358,8 @@ if [ "x$filepath" != "x" ] ; then
2>/dev/null && { unpack /tmp/$(basename $cfgfile) && break; }
;;
*)
-echo "tftp -g -r /$cfgfile -l /tmp/$(basename $cfgfile) $fileserv" >> /tmp/fileblub
- tftp -g -r /$cfgfile -l /tmp/$(basename $cfgfile) $fileserv \
+echo "tftp -g -r $cfgfile -l /tmp/$(basename $cfgfile) $fileserv" >> /tmp/fileblub
+ tftp -g -r $cfgfile -l /tmp/$(basename $cfgfile) $fileserv \
&& unpack /tmp/$(basename $cfgfile)
ls -la /tmp/$(basename $cfgfile) >> /tmp/fileblub
echo "F: /tmp/$(basename $cfgfile)" >>/tmp/fileblub
@@ -385,8 +385,8 @@ and as last\n# distro/default" >> /tmp/confviafile
2>/dev/null && { unpack /tmp/$(basename $cfgfile) && break; }
;;
tftp)
-echo "tftp -g -r /$cfgfile -l /tmp/$(basename $cfgfile) $fileserv" >> /tmp/fileblub
- tftp -g -r /$cfgfile -l /tmp/$(basename $cfgfile) $fileserv \
+echo "tftp -g -r $cfgfile -l /tmp/$(basename $cfgfile) $fileserv" >> /tmp/fileblub
+ tftp -g -r $cfgfile -l /tmp/$(basename $cfgfile) $fileserv \
&& { unpack /tmp/$(basename $cfgfile) && break; }
;;
esac
@@ -848,7 +848,7 @@ include_in_fsroot_union () {
case $srvproto in
nfs)
# nfsroot consists now of two different parts
- root_path=/$(uri_token $ROOTFS path)
+ root_path=$(uri_token $ROOTFS path)
nfsserver=$(uri_token $ROOTFS server)
mkdir -p /mnt/tmp/${root_path}_${union_id}
for proto in tcp udp fail; do