copy symlinks as is (don't chain symlinks)
authorMike Baker <mbm@openwrt.org>
Sun, 12 Mar 2006 11:41:16 +0000 (11:41 +0000)
committerMike Baker <mbm@openwrt.org>
Sun, 12 Mar 2006 11:41:16 +0000 (11:41 +0000)
SVN-Revision: 3351

openwrt/package/base-files/default/bin/firstboot

index ee082cffd249055fb59222412a514175353d7737..8d12d85b17488b8d21e25a2330ce1cfe7ff9be13 100755 (executable)
@@ -17,7 +17,7 @@ dupe() { # <new_root> <old_root>
        echo "done"
 
        echo -n "setting up symlinks... "
-       for file in $(cd $2; find . -xdev -type f; find . -xdev -type l;)
+       for file in $(cd $2; find . -xdev -type f;)
        do {
                case "$file" in
                "./rom/note") ;; #nothing
@@ -27,6 +27,10 @@ dupe() { # <new_root> <old_root>
                *) ln -sf /rom/${file#./*} $file;;
                esac
        } done
+       for file in $(cd $2; find . -xdev -type l;)
+       do {
+               cp -af /rom/${file#./*} $file
+       }
        echo "done"
 }