openwrt: reset button triggers a network restart, dhcpc ignores SIGTERM, fixtime removed from luci
This commit is contained in:
parent
42fdeb5ef8
commit
79f2894496
|
@ -1,7 +1,7 @@
|
||||||
#
|
#
|
||||||
# Automatically generated make config: don't edit
|
# Automatically generated make config: don't edit
|
||||||
# OpenWrt version: Kamikaze (r16491)
|
# OpenWrt version: Kamikaze (r16491)
|
||||||
# Sun Jun 21 11:25:33 2009
|
# Thu Jun 25 23:46:42 2009
|
||||||
#
|
#
|
||||||
CONFIG_HAVE_DOT_CONFIG=y
|
CONFIG_HAVE_DOT_CONFIG=y
|
||||||
# CONFIG_TARGET_ppc40x is not set
|
# CONFIG_TARGET_ppc40x is not set
|
||||||
|
@ -609,9 +609,7 @@ CONFIG_BUSYBOX_CONFIG_FDISK_SUPPORT_LARGE_DISKS=y
|
||||||
CONFIG_BUSYBOX_CONFIG_HEXDUMP=y
|
CONFIG_BUSYBOX_CONFIG_HEXDUMP=y
|
||||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_HEXDUMP_REVERSE is not set
|
# CONFIG_BUSYBOX_CONFIG_FEATURE_HEXDUMP_REVERSE is not set
|
||||||
# CONFIG_BUSYBOX_CONFIG_HD is not set
|
# CONFIG_BUSYBOX_CONFIG_HD is not set
|
||||||
CONFIG_BUSYBOX_CONFIG_HWCLOCK=y
|
# CONFIG_BUSYBOX_CONFIG_HWCLOCK is not set
|
||||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS is not set
|
|
||||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
|
|
||||||
# CONFIG_BUSYBOX_CONFIG_IPCRM is not set
|
# CONFIG_BUSYBOX_CONFIG_IPCRM is not set
|
||||||
# CONFIG_BUSYBOX_CONFIG_IPCS is not set
|
# CONFIG_BUSYBOX_CONFIG_IPCS is not set
|
||||||
# CONFIG_BUSYBOX_CONFIG_LOSETUP is not set
|
# CONFIG_BUSYBOX_CONFIG_LOSETUP is not set
|
||||||
|
@ -731,8 +729,8 @@ CONFIG_BUSYBOX_CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y
|
||||||
# CONFIG_BUSYBOX_CONFIG_NAMEIF is not set
|
# CONFIG_BUSYBOX_CONFIG_NAMEIF is not set
|
||||||
CONFIG_BUSYBOX_CONFIG_NC=y
|
CONFIG_BUSYBOX_CONFIG_NC=y
|
||||||
CONFIG_BUSYBOX_CONFIG_NETMSG=y
|
CONFIG_BUSYBOX_CONFIG_NETMSG=y
|
||||||
# CONFIG_BUSYBOX_CONFIG_NC_SERVER is not set
|
CONFIG_BUSYBOX_CONFIG_NC_SERVER=y
|
||||||
# CONFIG_BUSYBOX_CONFIG_NC_EXTRA is not set
|
CONFIG_BUSYBOX_CONFIG_NC_EXTRA=y
|
||||||
CONFIG_BUSYBOX_CONFIG_NETSTAT=y
|
CONFIG_BUSYBOX_CONFIG_NETSTAT=y
|
||||||
CONFIG_BUSYBOX_CONFIG_FEATURE_NETSTAT_WIDE=y
|
CONFIG_BUSYBOX_CONFIG_FEATURE_NETSTAT_WIDE=y
|
||||||
CONFIG_BUSYBOX_CONFIG_NSLOOKUP=y
|
CONFIG_BUSYBOX_CONFIG_NSLOOKUP=y
|
||||||
|
@ -1227,9 +1225,9 @@ CONFIG_PACKAGE_luci-admin-mini=y
|
||||||
#
|
#
|
||||||
CONFIG_PACKAGE_luci-cbi=y
|
CONFIG_PACKAGE_luci-cbi=y
|
||||||
CONFIG_PACKAGE_luci-core=y
|
CONFIG_PACKAGE_luci-core=y
|
||||||
CONFIG_PACKAGE_luci-core_compile=y
|
# CONFIG_PACKAGE_luci-core_compile is not set
|
||||||
# CONFIG_PACKAGE_luci-core_stripped is not set
|
# CONFIG_PACKAGE_luci-core_stripped is not set
|
||||||
# CONFIG_PACKAGE_luci-core_source is not set
|
CONFIG_PACKAGE_luci-core_source=y
|
||||||
# CONFIG_PACKAGE_luci-fastindex is not set
|
# CONFIG_PACKAGE_luci-fastindex is not set
|
||||||
CONFIG_PACKAGE_luci-http=y
|
CONFIG_PACKAGE_luci-http=y
|
||||||
# CONFIG_PACKAGE_luci-ipkg is not set
|
# CONFIG_PACKAGE_luci-ipkg is not set
|
||||||
|
|
|
@ -2,9 +2,9 @@ config system
|
||||||
option hostname flukso
|
option hostname flukso
|
||||||
option device 0123456789abcdef0123456789abcdef
|
option device 0123456789abcdef0123456789abcdef
|
||||||
option key 00112233445566778899aabbccddeeff
|
option key 00112233445566778899aabbccddeeff
|
||||||
option version 5
|
option version 6
|
||||||
|
|
||||||
config button
|
config button
|
||||||
option button reset
|
option button reset
|
||||||
option action pressed
|
option action pressed
|
||||||
option handler 'gpioctl set 7; gpioctl clear 7'
|
option handler '/etc/init.d/network restart'
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
config wifi-device wifi0
|
config wifi-device wifi0
|
||||||
option type atheros
|
option type atheros
|
||||||
option channel auto
|
option channel auto
|
||||||
|
option mode 11bg
|
||||||
option diversity 0
|
option diversity 0
|
||||||
option txantenna 1
|
option txantenna 1
|
||||||
option rxantenna 1
|
option rxantenna 1
|
||||||
|
@ -12,8 +13,6 @@ config wifi-iface
|
||||||
option mode sta
|
option mode sta
|
||||||
option nosbeacon 1
|
option nosbeacon 1
|
||||||
option hidden 0
|
option hidden 0
|
||||||
option txpower 16
|
|
||||||
option ssid zwaluw
|
option ssid zwaluw
|
||||||
option encryption wep
|
option encryption wep
|
||||||
option key 4ae56b7820f6b6b3cba78da46b
|
option key 4ae56b7820f6b6b3cba78da46b
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ include $(INCLUDE_DIR)/package.mk
|
||||||
define Package/flukso
|
define Package/flukso
|
||||||
SECTION:=utils
|
SECTION:=utils
|
||||||
CATEGORY:=Utilities
|
CATEGORY:=Utilities
|
||||||
DEPENDS:=+liblua-xmlrpc +ntpclient +netcat
|
DEPENDS:=+liblua-xmlrpc +ntpclient
|
||||||
TITLE:=Flukso - community metering
|
TITLE:=Flukso - community metering
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ function hmac(T, M, timestamp)
|
||||||
end
|
end
|
||||||
|
|
||||||
T.timestamp = timestamp or os.time()
|
T.timestamp = timestamp or os.time()
|
||||||
T.message = T.timestamp..':'..serialise(M)..':'..T.key -- or T.timestamp..':'..T.nonce..':'..T.key
|
T.message = T.timestamp..':'..serialise(M)..':'..T.key
|
||||||
T.signature = lxyssl.hash('hmac-sha1', T.key):digest(T.message):hex()
|
T.signature = lxyssl.hash('hmac-sha1', T.key):digest(T.message):hex()
|
||||||
|
|
||||||
T.message, T.key, T.version = nil, nil, nil
|
T.message, T.key, T.version = nil, nil, nil
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# Copyroght (c) 2008 jokamajo.org
|
# Copyright (c) 2008-2009 jokamajo.org
|
||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
START=98
|
START=98
|
||||||
|
@ -8,10 +8,10 @@ start() {
|
||||||
stty 4800 < /dev/ttyS0
|
stty 4800 < /dev/ttyS0
|
||||||
/usr/share/lua/flukso/flukso.lua >&- 2>&- <&- &
|
/usr/share/lua/flukso/flukso.lua >&- 2>&- <&- &
|
||||||
/usr/share/lua/flukso/heartbeat.lua 1 >&- 2>&- <&-
|
/usr/share/lua/flukso/heartbeat.lua 1 >&- 2>&- <&-
|
||||||
echo -e "$(date '+%M') * * * * /usr/share/lua/flukso/heartbeat.lua 0\n"'*/15 * * * * [ -z "$(ps | grep '\'fluks[o]\'')" ] && reboot' | crontab -
|
echo -e "$(date '+%M') * * * * /usr/share/lua/flukso/heartbeat.lua 0\n"'*/15 * * * * [ -z "$(ps | grep '\'flukso.lu[a]\'')" ] && reboot' | crontab -
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
crontab -r
|
crontab -r
|
||||||
kill $(ps | grep 'fluks[o]' | awk '{print $1}')
|
kill -SIGKILL $(ps | grep 'flukso.lu[a]' | awk '{print $1}')
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ PKG_NAME:=luci
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
ifeq ($(USELOCAL),1)
|
ifeq ($(USELOCAL),1)
|
||||||
PKG_VERSION:=0.8+svn
|
PKG_VERSION:=0.8.6
|
||||||
else
|
else
|
||||||
PKG_SOURCE_URL:=http://svn.luci.subsignal.org/luci/$(PKG_BRANCH)
|
PKG_SOURCE_URL:=http://svn.luci.subsignal.org/luci/$(PKG_BRANCH)
|
||||||
ifeq ($(DUMP),)
|
ifeq ($(DUMP),)
|
||||||
|
@ -287,7 +287,6 @@ endef
|
||||||
|
|
||||||
define Package/luci-admin-core/install
|
define Package/luci-admin-core/install
|
||||||
$(call Package/luci/install/template,$(1),modules/admin-core)
|
$(call Package/luci/install/template,$(1),modules/admin-core)
|
||||||
touch $(1)/etc/init.d/luci_fixtime || true
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
#!/bin/sh /etc/rc.common
|
|
||||||
|
|
||||||
START=05
|
|
||||||
|
|
||||||
start() {
|
|
||||||
cat <<' EOF' | lua -l luci.fs -l luci.util -
|
|
||||||
if (os.time() < 1000000000) then
|
|
||||||
os.execute('date -s ' .. os.date('%m%d%H%M%Y', luci.fs.mtime("/etc/init.d/luci_fixtime")))
|
|
||||||
end
|
|
||||||
EOF
|
|
||||||
}
|
|
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
[ -n "${IPKG_INSTROOT}" ] || {
|
[ -n "${IPKG_INSTROOT}" ] || {
|
||||||
/etc/init.d/luci_fixtime enabled || /etc/init.d/luci_fixtime enable
|
|
||||||
/etc/init.d/luci_ethers enabled || /etc/init.d/luci_ethers enable
|
/etc/init.d/luci_ethers enabled || /etc/init.d/luci_ethers enable
|
||||||
/etc/init.d/luci_hosts enabled || /etc/init.d/luci_hosts enable
|
/etc/init.d/luci_hosts enabled || /etc/init.d/luci_hosts enable
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
#!/bin/sh /etc/rc.common
|
|
||||||
|
|
||||||
START=05
|
|
||||||
|
|
||||||
start() {
|
|
||||||
cat <<' EOF' | lua -l luci.fs -l luci.util -
|
|
||||||
if (os.time() < 1000000000) then
|
|
||||||
os.execute('date -s ' .. os.date('%m%d%H%M%Y', luci.fs.mtime("/etc/init.d/luci_fixtime")))
|
|
||||||
end
|
|
||||||
EOF
|
|
||||||
}
|
|
|
@ -64,11 +64,6 @@ function bssid.cfgvalue(self, section)
|
||||||
or wifidata[ifname]["Access Point"])) or "-"
|
or wifidata[ifname]["Access Point"])) or "-"
|
||||||
end
|
end
|
||||||
|
|
||||||
channel = s:option(DummyValue, "channel", translate("channel"))
|
|
||||||
function channel.cfgvalue(self, section)
|
|
||||||
return wireless[self.map:get(section, "device")].channel
|
|
||||||
end
|
|
||||||
|
|
||||||
protocol = s:option(DummyValue, "_mode", translate("protocol"))
|
protocol = s:option(DummyValue, "_mode", translate("protocol"))
|
||||||
function protocol.cfgvalue(self, section)
|
function protocol.cfgvalue(self, section)
|
||||||
local mode = wireless[self.map:get(section, "device")].mode
|
local mode = wireless[self.map:get(section, "device")].mode
|
||||||
|
@ -134,6 +129,9 @@ end
|
||||||
|
|
||||||
-- Config Section --
|
-- Config Section --
|
||||||
|
|
||||||
|
local hwtype = m:get(wifidevs[1], "type")
|
||||||
|
|
||||||
|
--[[
|
||||||
s = m:section(NamedSection, wifidevs[1], "wifi-device", translate("devices"))
|
s = m:section(NamedSection, wifidevs[1], "wifi-device", translate("devices"))
|
||||||
s.addremove = false
|
s.addremove = false
|
||||||
|
|
||||||
|
@ -155,7 +153,7 @@ ch = s:option(Value, "channel", translate("a_w_channel"))
|
||||||
for i=1, 14 do
|
for i=1, 14 do
|
||||||
ch:value(i, i .. " (2.4 GHz)")
|
ch:value(i, i .. " (2.4 GHz)")
|
||||||
end
|
end
|
||||||
|
]]--
|
||||||
|
|
||||||
s = m:section(TypedSection, "wifi-iface", translate("m_n_local"))
|
s = m:section(TypedSection, "wifi-iface", translate("m_n_local"))
|
||||||
s.anonymous = true
|
s.anonymous = true
|
||||||
|
@ -238,7 +236,7 @@ function key:validate(value, section)
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
elseif encr:formvalue(section) == 'psk' or encr:formvalue(section) == 'psk2' then
|
elseif encr:formvalue(section) == 'psk' or encr:formvalue(section) == 'psk2' then
|
||||||
return #value == 64 and value:hexcheck()
|
return #value > 7 and #value < 64 and value
|
||||||
else
|
else
|
||||||
return value
|
return value
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
Index: config-2.6.26
|
||||||
|
===================================================================
|
||||||
|
--- config-2.6.26 (revision 16491)
|
||||||
|
+++ config-2.6.26 (working copy)
|
||||||
|
@@ -20,7 +20,7 @@
|
||||||
|
# CONFIG_BT is not set
|
||||||
|
CONFIG_CEVT_R4K=y
|
||||||
|
CONFIG_CLASSIC_RCU=y
|
||||||
|
-CONFIG_CMDLINE="console=ttyS0,9600 rootfstype=squashfs,jffs2 init=/etc/preinit"
|
||||||
|
+CONFIG_CMDLINE="console=ttyS0,4800 rootfstype=squashfs,jffs2 init=/etc/preinit"
|
||||||
|
CONFIG_CPU_BIG_ENDIAN=y
|
||||||
|
CONFIG_CPU_HAS_LLSC=y
|
||||||
|
CONFIG_CPU_HAS_PREFETCH=y
|
|
@ -0,0 +1,13 @@
|
||||||
|
Index: ar5315.h
|
||||||
|
===================================================================
|
||||||
|
--- ar5315.h (revision 16491)
|
||||||
|
+++ ar5315.h (working copy)
|
||||||
|
@@ -355,7 +355,7 @@
|
||||||
|
#define AR5315_GPIO_INT_LVL_HIGH 2 /* High Level Triggered */
|
||||||
|
#define AR5315_GPIO_INT_LVL_EDGE 3 /* Edge Triggered */
|
||||||
|
|
||||||
|
-#define AR5315_RESET_GPIO 5
|
||||||
|
+#define AR5315_RESET_GPIO 6
|
||||||
|
#define AR5315_NUM_GPIO 22
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
--- dhcpc.c 2009-08-18 23:24:17.000000000 +0200
|
||||||
|
+++ dhcpc.c 2009-08-18 23:25:52.000000000 +0200
|
||||||
|
@@ -616,10 +616,10 @@
|
||||||
|
timeout = INT_MAX;
|
||||||
|
break;
|
||||||
|
case SIGTERM:
|
||||||
|
- bb_info_msg("Received SIGTERM");
|
||||||
|
- if (opt & OPT_R) /* release on quit */
|
||||||
|
- perform_release(requested_ip, server_addr);
|
||||||
|
- goto ret0;
|
||||||
|
+ bb_info_msg("Received SIGTERM: ignoring!");
|
||||||
|
+ // if (opt & OPT_R) /* release on quit */
|
||||||
|
+ // perform_release(requested_ip, server_addr);
|
||||||
|
+ // goto ret0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} /* for (;;) - main loop ends */
|
|
@ -0,0 +1,8 @@
|
||||||
|
$Id$
|
||||||
|
|
||||||
|
apply following patches to a fresh 8.09 installation:
|
||||||
|
-----------------------------------------------------
|
||||||
|
100.disable.console.patch in 8.09_base_dir/target/linux/generic-2.6/
|
||||||
|
110.set.console.baud.to.4800.patch in 8.09_base_dir/target/linux/atheros/
|
||||||
|
120.set.AR5315_RESET_GPIO.to.6.patch in 8.09_base_dir/target/linux/atheros/files/include/asm-mips/mach-atheros/ar5315/
|
||||||
|
130.ignore.dhcpc.sigterm.patch in 8.09_base_dir/build_dir/mips/busybox-1.11.2/networking/udhcp/
|
Loading…
Reference in New Issue