#!/bin/sh
# $Id$
-exec 2>/dev/null
[ -f "/tmp/.firstboot" ] && {
echo "firstboot is already running"
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
cd $jdev
fi
+exec 2>/dev/null
+
mount /dev/mtdblock/2 /rom -o ro
echo -n "creating directories... "
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;
}
#!/bin/sh
[ -z "$FAILSAFE" ] && {
- { mount | grep jffs2 1>-; } || firstboot
+ { mount | grep jffs2 1>&-; } || firstboot
}
# turn off DMZ led
echo "0x00" > /proc/sys/diag
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