Added vlan enabling as suggested in #204, closes #204
[openwrt/svn-archive/archive.git] / openwrt / package / base-files / default / bin / firstboot
index 1c3d1a7d661479904be7a9944bcf5a8c3b796f22..eff7063b1c136e55a2dd5274c9aabbd7ec321881 100755 (executable)
@@ -17,7 +17,7 @@ jdev=$(mount | awk '/jffs2/ {print $3}')
 
 if [ -z "$jdev" ]; then
        echo -n "Creating jffs2 partition... "
-       mtd erase OpenWrt >&- 
+       mtd erase OpenWrt >&- 2>&-
        mount -t jffs2 /dev/mtdblock/4 /jffs
        echo "done"
        cd /jffs
@@ -42,11 +42,10 @@ echo "done"
 echo -n "setting up symlinks... "
 for file in $(cd /rom; find *  -type f; find *  -type l;)
 do {
-  [ "${file%/*}" = "usr/lib/ipkg/info" -o "${file%/*}" = "etc/config" ] && {
-    cp -f /rom/$file $file
-  } || {
-    ln -sf /rom/$file $file
-  }
+  case "${file%/*}" in
+    "usr/lib/ipkg/info"|"etc/config") cp -f /rom/$file $file;;
+    *) ln -sf /rom/$file $file;;
+  esac
 } done
 echo "done"