fix syntax error
authoropenwrt <openwrt@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 27 Jul 2004 07:27:13 +0000 (07:27 +0000)
committeropenwrt <openwrt@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 27 Jul 2004 07:27:13 +0000 (07:27 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@113 3c298f89-4303-0410-b956-a3cf2f4a3e73

root/bin/firstboot
root/bin/ipkg
root/etc/init.d/S99done
root/sbin/ifdown

index f28a042..5076d1c 100755 (executable)
@@ -1,7 +1,6 @@
 #!/bin/sh
 # $Id$
 
-exec 2>/dev/null
 
 [ -f "/tmp/.firstboot" ] && {
        echo "firstboot is already running"
@@ -13,7 +12,7 @@ jdev=$(mount | awk '/jffs2/ {print $3}')
 
 if [ -z "$jdev" ]; then
        echo -n "Creating jffs2 partition... "
-       mtd erase OpenWrt >- 
+       mtd erase OpenWrt >&
        mount -t jffs2 /dev/mtdblock/4 /jffs
        echo "done"
        cd /jffs
@@ -23,6 +22,8 @@ else
        cd $jdev
 fi
 
+exec 2>/dev/null
+
 mount /dev/mtdblock/2 /rom -o ro
 
 echo -n "creating directories... "
index c802ce1..bf275d8 100755 (executable)
@@ -26,7 +26,7 @@ ipkg_is_upgrade () {
   while [ \! -z "$A" ] && [ \! -z "$B" ]; do {
     set $A; a=$1; shift; A=$*
     set $B; b=$1; shift; B=$*
-    { [ "$a" -gt "$b" ] 2>- || [ "$a" ">" "$b" ]; } && { return 0; }
+    { [ "$a" -gt "$b" ] 2>&- || [ "$a" ">" "$b" ]; } && { return 0; }
   }; done
   return 1;
 }
index 3ba15e8..73a4da4 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 [ -z "$FAILSAFE" ] && {
-       { mount | grep jffs2 1>-; } || firstboot
+       { mount | grep jffs2 1>&-; } || firstboot
 }
 # turn off DMZ led
 echo "0x00" > /proc/sys/diag
index d1d19b0..4c7e982 100755 (executable)
@@ -4,5 +4,5 @@
   debug "### ifdown $type ###"
   if=$(nvram_get ${type}_ifname)
   if_valid $if || return
-  kill $(cat /var/run/${if}.pid 2>-) 2>-
+  kill $(cat /var/run/${if}.pid 2>&-) 2>&-
   $DEBUG ifconfig $if down