mirror of https://github.com/hak5/openwrt.git
parent
ce568ad431
commit
3e988e1271
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
exec 2>/dev/null
|
|
||||||
|
|
||||||
[ -f "/tmp/.firstboot" ] && {
|
[ -f "/tmp/.firstboot" ] && {
|
||||||
echo "firstboot is already running"
|
echo "firstboot is already running"
|
||||||
|
@ -13,7 +12,7 @@ jdev=$(mount | awk '/jffs2/ {print $3}')
|
||||||
|
|
||||||
if [ -z "$jdev" ]; then
|
if [ -z "$jdev" ]; then
|
||||||
echo -n "Creating jffs2 partition... "
|
echo -n "Creating jffs2 partition... "
|
||||||
mtd erase OpenWrt >-
|
mtd erase OpenWrt >&-
|
||||||
mount -t jffs2 /dev/mtdblock/4 /jffs
|
mount -t jffs2 /dev/mtdblock/4 /jffs
|
||||||
echo "done"
|
echo "done"
|
||||||
cd /jffs
|
cd /jffs
|
||||||
|
@ -23,6 +22,8 @@ else
|
||||||
cd $jdev
|
cd $jdev
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
exec 2>/dev/null
|
||||||
|
|
||||||
mount /dev/mtdblock/2 /rom -o ro
|
mount /dev/mtdblock/2 /rom -o ro
|
||||||
|
|
||||||
echo -n "creating directories... "
|
echo -n "creating directories... "
|
||||||
|
|
|
@ -26,7 +26,7 @@ ipkg_is_upgrade () {
|
||||||
while [ \! -z "$A" ] && [ \! -z "$B" ]; do {
|
while [ \! -z "$A" ] && [ \! -z "$B" ]; do {
|
||||||
set $A; a=$1; shift; A=$*
|
set $A; a=$1; shift; A=$*
|
||||||
set $B; b=$1; shift; B=$*
|
set $B; b=$1; shift; B=$*
|
||||||
{ [ "$a" -gt "$b" ] 2>- || [ "$a" ">" "$b" ]; } && { return 0; }
|
{ [ "$a" -gt "$b" ] 2>&- || [ "$a" ">" "$b" ]; } && { return 0; }
|
||||||
}; done
|
}; done
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
[ -z "$FAILSAFE" ] && {
|
[ -z "$FAILSAFE" ] && {
|
||||||
{ mount | grep jffs2 1>-; } || firstboot
|
{ mount | grep jffs2 1>&-; } || firstboot
|
||||||
}
|
}
|
||||||
# turn off DMZ led
|
# turn off DMZ led
|
||||||
echo "0x00" > /proc/sys/diag
|
echo "0x00" > /proc/sys/diag
|
||||||
|
|
|
@ -4,5 +4,5 @@
|
||||||
debug "### ifdown $type ###"
|
debug "### ifdown $type ###"
|
||||||
if=$(nvram_get ${type}_ifname)
|
if=$(nvram_get ${type}_ifname)
|
||||||
if_valid $if || return
|
if_valid $if || return
|
||||||
kill $(cat /var/run/${if}.pid 2>-) 2>-
|
kill $(cat /var/run/${if}.pid 2>&-) 2>&-
|
||||||
$DEBUG ifconfig $if down
|
$DEBUG ifconfig $if down
|
||||||
|
|
Loading…
Reference in New Issue