fixed fai file copying
[hdw-linux/hdw-linux.git] / fai / scripts / rc_fai.sh
index d1e4f67..1947361 100755 (executable)
@@ -114,7 +114,11 @@ cd /fai/files
 for file in `find -type f | grep -v CVS`; do
        srcf=`basename $file`
        trgf=`dirname $file`
-       [ "$srcf" = "DEFAULT" -o "$srcf" = "$myip" ] && cp -v $file $root/$trgf
+       trgdir=`dirname $trgf`
+       if [ "$srcf" = "DEFAULT" -o "$srcf" = "$myip" ] ; then
+               mkdir -p $root/$trgdir
+               cp -v $file $root/$trgf
+       fi
 done
 
 #