Bug#320024: patch for #320024

Michael Tautschnig michael.tautschnig at zt-consulting.com
Thu Oct 20 15:24:05 CEST 2005


> 
> Done.
> slightly modified built into fai-cd. worked in my tests.
> 
Thanks! But IMHO there are two minor issues - I'm quoting your patch for
reference:

> Committed in subversion /people/lazyboy/bugfixes/320024/
> 
>>>>>>>>>>>>>>>>>>

     tmp1=$(mktemp)
     cat > $tmp1 <<EOF
 # mirror location for fai CD, file generated by fai-cd
+EOF
+    for i in $mirrordir/dists/* ; do
+      echo -n "deb file:/media/mirror `basename $i` ">>$tmp1
+      find $i -name "Packages*" | grep binary | \
+        sed 's/\/binary-.*$//' | uniq | sed "s#$i/##" | tr '\n' " " >>$tmp1
+    done

-deb file:/media/mirror stable main updates/main
-deb file:/fai/files packages/
-EOF
     mount --bind $tmp1 $NFSROOT/etc/apt/sources.list
     customize_nfsroot
     echo "Writing FAI CD-ROM image to $isoname. This may need some time."

<<<<<<<<<<<<<<<<<<

You need to add "echo" to have a newline after each deb file:/...., i.e. 

...
+      find $i -name "Packages*" | grep binary | \
+        sed 's/\/binary-.*$//' | uniq | sed "s#$i/##" | tr '\n' " " >>$tmp1
       echo >>$tmp1
+    done
...

and you should probably do "rm $tmp1" somewhere afterwards...

Thanks again,
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.uni-koeln.de/pipermail/linux-fai-devel/attachments/20051020/886b3a46/attachment.bin 


More information about the linux-fai-devel mailing list