Commit e6a1c4df authored by Martin Michlmayr's avatar Martin Michlmayr

Remove some old code for wl500 and wgt634u that wasn't complete

or in use.

r53310
parent 1902fad2
This udeb is used to preseed debian-installer from information already
found on a device, such as the network configuration from an existing
Unix installation or from NVRAM/flash on some embedded devices.
Unix installation or from flash on some embedded devices.
......@@ -4,7 +4,7 @@
However, there is potentially more information on a device (e.g.
users) that could be preseeded.
- More hardware support, in particular the Asus WL-500 series.
- More hardware support.
- Better error handling: e.g. make some sound on NSLU2 if we cannot
preseed networking.
......
......@@ -3,6 +3,8 @@ oldsys-preseed (1.4) UNRELEASED; urgency=low
* Add support for QNAP TS-109/TS-209.
* Mount partitions with configuration data read-only since we only
need to read from them.
* Remove some old code for wl500 and wgt634u that wasn't complete
or in use.
-- Martin Michlmayr <tbm@cyrius.com> Fri, 15 Feb 2008 18:33:36 +0100
......
# Copyright (C) 2005, 2006 Martin Michlmayr <tbm@cyrius.com>
# Copyright (C) 2005, 2006, 2008 Martin Michlmayr <tbm@cyrius.com>
# This code is covered by the GNU General Public License.
......@@ -137,43 +137,6 @@ parse_sysconf() {
DOMAIN=$(get_var "$sysconf" "domain_name")
}
# Parse NVRAM variables as found on BCM947xx devices
# $1 = output of "nvram show" (i.e. a list of var=value strings)
parse_bcm947xx_nvram() {
if [ "$(get_var "$1" "wan0_proto")" != "dhcp" ]; then
NET_CONFIG=static
fi
INTERFACE=$(get_var "$1" "wan0_ifname")
IPADDRESS=$(get_var "$1" "wan0_ipaddr")
NETMASK=$(get_var "$1" "wan0_netmask")
GATEWAY=$(get_var "$1" "wan_gateway_t")
var_add NAMESERVERS "$(get_var "$1" "wan_dns_t")"
HOSTNAME=$(get_var "$1" "lan_hostname")
DOMAIN=$(get_var "$1" "lan_domain")
}
# Parse the NVRAM config generated by the Web Manager on Asus WL500*
# $1 = output of "nvram show" (i.e. a list of var=value strings)
parse_wl500_nvram_web_manager() {
INTERFACE=$(get_var "$1" "wan_ifname")
if [ "$(get_var "$1" "2_x_ConnectionType")" = "Static IP" ]; then
NET_CONFIG=static
fi
if [ -n "$(get_var "$1" "5_ExternalIPAddress")" ] ; then
IPADDRESS=$(get_var "$1" "5_ExternalIPAddress")
else
IPADDRESS=$(get_var "$1" "wan_ipaddr")
fi
NETMASK=$(get_var "$1" "4_x_ExternalSubnetMask")
GATEWAY=$(get_var "$1" "4_x_ExternalGateway")
if [ -n "$(get_var "$1" "4_x_DNSServerEnable")" ]; then
if [ $(get_var "$1" "4_x_DNSServerEnable") -ne 1 ]; then
var_add NAMESERVERS "$(get_var "$1" "4_x_DNSServer1")"
var_add NAMESERVERS "$(get_var "$1" "4_x_DNSServer2")"
fi
fi
HOSTNAME=$(get_var "$1" "9_x_HostName")
}
# Generating
......
......@@ -176,41 +176,6 @@ case "`archdetect`" in
exit_unknown
fi
;;
mipsel/bcm947xx)
# Some BCM947xx devices use NVRAM to store their Linux
# configuration, some use a Linux filesystem. We only
# support the latter at the moment.
if [ 1 ]; then
check_file /proc/mtd
config=$(get_mtdblock "config")
if [ -z "$config" ]; then
log "Can't find MTD partition holding Linux config"
exit
fi
path=/tmp/oldsys-preseed
mkdir -p $path/mnt $path/lpr
mount -t minix -o ro /dev/$config $path/mnt
if [ ! -e $path/mnt/config.lrp ]; then
log "config.lrp does not exist in $path/mnt"
umount $path/mnt
exit
fi
cd $path/lpr
tar -xzf $path/mnt/config.lrp
parse_unix_tree $path/lpr
parse_leaf_tree $path/lpr
parse_network_interfaces $path/lpr/etc/network/interfaces "vlan6"
if [ "$INTERFACE" = "vlan6" ]; then
INTERFACE=eth0
fi
DEFAULT_HOSTNAME="WGT634U"
umount $path/mnt
rm -rf $path/lpr
rmdir $path/mnt $path || true
else
parse_bcm947xx_nvram "$(nvram show)"
fi
;;
*)
exit_unknown
;;
......
This diff is collapsed.
d-i netcfg/choose_interface select eth1
d-i netcfg/use_dhcp boolean true
parse_bcm947xx_nvram "$(cat $TEST_DIR/wl500_dhcp.nvram-text)"
parse_wl500_nvram_web_manager "$(cat $TEST_DIR/wl500_dhcp.nvram-text)"
generate_preseed_file "$1"
d-i netcfg/choose_interface select eth0
d-i netcfg/get_ipaddress string 128.232.242.11
d-i netcfg/get_netmask string ""
d-i netcfg/get_gateway string 128.232.242.62
d-i netcfg/get_nameservers string 131.111.8.42 131.111.12.20
d-i netcfg/confirm_static boolean true
d-i netcfg/disable_dhcp boolean true
d-i netcfg/get_hostname string WGT634U
d-i netcfg/get_domain string cyrius.com
path=$(mktemp -t oldsys-preseed-tests.XXXXXX -d)
(cd $path ; tar -xzf $TEST_DIR/wgt634u.lrp > /dev/null 2>&1)
parse_unix_tree $path
parse_leaf_tree $path
parse_network_interfaces $path/etc/network/interfaces "vlan6"
if [ "$INTERFACE" = "vlan6" ]; then
INTERFACE=eth0
fi
DEFAULT_HOSTNAME="WGT634U"
rm -rf $path
generate_preseed_file "$1"
wl_country_code=DE
8_RipAuthMethodLAN=Disable
7_FirewallLog=
9_x_DDNSPassword=
8_RipOffsetDir=
9_x_DDNSUserName=
4_x_ExternalGateway=192.168.177.1
16_x_WServer=
13_RBRListCount=1
4_VServerCount=0
16_x_WSecurityDate=1111111
12_AuthDBUsername=
8_RipOffsetMetric=1
9_x_NatLogEnable=1
9_x_WanWebEnable=0
8_RipVersionLAN=Both
4_autofwOutProto=
wl0_wds=
16_x_FUserLogin=
9_DomainName=kocenda.klfree.net
7_LanWanActiveSVC=000000
7_DmzWanDefaultAct=ACCEPT
8_RipDRouteType3Act=0
16_x_FStayTimeout=240
8_RipSpWANEnable=1
11_ACLListCount=1
1_x_SystemUpTime=
lan_ifnames=eth0 eth2
13_WEPKey1=
4_IPTablesInfo=
13_WEPKey2=
1_x_Setting=1
13_WEPKey3=
wl0_auth=0
wl0_radius_port=1812
13_WEPKey4=
7_WanLanFirewallEnable=0
9_ManualIP=
5_x_UserName1=
wl0_radius_ipaddr=
5_x_UserName2=
7_URLEntry=
7_DmzWanDstIP=
5_x_IdleTxOnly1=0
7_WanDmzICMP=
5_x_IdleTxOnly2=0
16_x_PrinterStatus=
9_DHCPServerConfigurable=1
9_x_LANGateway=
16_x_WSubject=Motion detection alert!!!
9_DmzMinAddress=192.168.2.2
16_x_WRecordTime=0
15_AuthDBUsername=
7_WanLocalProFlag=
5_ExternalIPAddress=
4_VServerProto=
4_InternalPort=
10_x_OutdoorChannel=0
13_x_Rekey=0
7_DmzIP=192.168.2.1
5_x_WANIPAddress=
1_x_FirmwareVersion=
16_x_WSecurity=0
16_x_WWANEnable=0
13_x_RadioEnable=1
8_RipAuthMethodWAN=Disable
7_DmzLanDstPort=
5_x_PPPoEMRU=1492
14_MacAddr=
lan_ipaddr=192.168.001.001
clkfreq=125
8_RipDRouteType2Act=0
11_ACLMethod=Disable
2_x_ConnectionType=Static IP
11_MacAddr0=000D88BDC1C4
5_x_WANAction=
5_x_HostNameForISP=kLfREE_v_Mako
4_VServerEnable=0
wl0_phytypes=b
wl0_wep=
16_x_PrinterUser=
10_x_Phrase=
10_Channel=52
5_PPPoERouteCount=0
wl0_frag=2346
10_x_CountryCode=
14_AESType=
9_ReservedAddressListCount=0
7_WanLanDstPort=
13_x_GProtection=0
sdram_config=0x0000
9_x_ServerLogEnable=
8_RipVersionWAN=Both
5_x_MultiPPPoEDef=0
wl0_country=Europe
12_ExAuthDBPortNumber=1812
8_RipOffsetIP=
11_ApplyDevices=802.11g only
1_x_Password=root
scratch=a0180000
4_ExposedIPCount=0
13_x_Phrase=
4_PortMappingEnabled=1
9_DmzManualDHCPEnable=1
wl_static=ok
16_x_PrinterAction=
7_WanLocalSrcIP=
9_x_WanLPREnable=0
9_x_TimeZone=MEZ-1MESZ
wl0_rateset=all
7_WanDmzDstPort=
4_MappedIP_0=
13_DataRateAll=0
13_x_BRApply=0
12_ExAuthDBPassword=
4_MappedIP_1=
9_x_DDNSStatus=1
9_DHCPRelayIP=
8_RipSpLANEnable=1
8_RipSRouteCount=0
4_MappedIP_2=
lan_ifname=br0
8_RipDRouteType1Act=0
4_MappedIP_3=
7_DmzWanRuleCount=0
4_InternalClient=
4_MappedIP_4=
10_WEPDefaultKey=Key1
4_MappedIP_5=
sdram_refresh=0x8040
7_DmzLanDstIP=
7_WanDmzDefaultAct=ACCEPT
4_ExternalPort=
13_WEPType=0
4_ExposedIP=
sid_1=General
16_x_FLoginTimeout=120
10_x_TurboMode=0
4_autofwCount=0
sid_2=Layer3Forwarding
sdram_ncdl=0x00000000
16_x_FUserRight=
14_ACLMethod=Disable
sid_3=WANCommonInterface
7_DmzEnable=0
sid_4=IPConnection
hardware_version=WL500-02-02-01-00
16_x_FIsSuperuser=0
8_RouteInfo=
5_x_ExternalGateway=
sid_5=PPPConnection
sid_6=EthernetLink
5_x_WANType=
7_DmzWanDstPort=
7_LanWanICMP=
sid_7=FirewallConfig
13_WEPDefaultKey=Key1
sid_8=RouterConfig
4_VServerDescript=
sid_9=LANHostConfig
wan_ipaddr=192.168.177.251
9_MaxAddress=192.168.177.246
16_x_WCaption=Web Camera Live Demo!!!
13_x_IBSS=1
wl0_rts=2347
9_DmzDHCPServerConfigurable=0
10_WEPKey1=
8_RipOffsetIn=0
16_x_PrinterModel=
10_WEPKey2=
7_DmzWanICMP=
4_MappedDescript_0=
10_WEPKey3=
8_RipDRouteType0Act=0
4_MappedDescript_1=
10_WEPKey4=
7_WanLocalRuleCount=0
4_MappedDescript_2=
wl0_wpa_gtk_rekey=0
8_GWStaticGW=
7_LanWanSrcIP=
4_MappedDescript_3=
4_MappedDescript_4=
sid_10=WLANConfig11a
4_MappedDescript_5=
wl0_key=1
sid_11=DeviceSecurity11a
10_DataRate=0
9_x_DDNSEnable=0
13_x_Mode11g=3
sid_12=WLANAuthentication11a
9_x_LDNSServer1=192.168.166.67
sid_13=WLANConfig11b
9_x_LDNSServer2=192.168.177.245
2_DefaultConnectionService=
15_ExAuthDBPassword=
sid_14=DeviceSecurity11b
8_RipSRouteAct=1
et0phyaddr=30
sid_15=WLANAuthentication11b
9_DHCPRelay=1
sid_16=PrinterStatus
4_RemoteHost=
wan_ifname=eth1
16_x_FUserPass=
14_AESKey=
13_DataRate=1
11_MacAddr=
9_x_LGateway=192.168.177.1
4_PortMappingLeaseDuration=
16_x_WSignal=0
7_LanDmzSrcIP=
5_x_PPPoEDir=
9_x_DDNSServer=WWW.DYNDNS.ORG
wl0_radio=1
5_x_PPPoEMTU=1492
1_x_BootloaderVersion=
10_SSID=default
8_StaticMask=0
12_CertDBFile=
9_ReservedAddresses=
wl0_bcn=100
7_SystemLog=
11_AESType=
5_x_PPPoESess=
wl0_hwaddr=00:0E:A6:98:B0:64
9_IPRouters=192.168.177.245
15_UseLocalAuthDatabase=0
7_DmzLanProFlag=
5_x_PPPoERelay=0
wl0_gmode_protection=off
13_x_BRhwaddr=
7_WanDmzSrcIP=
7_DmzLanDefaultAct=ACCEPT
7_DmzLanFirewallEnable=0
4_RSIPAvailable=1
4_ExposedDescript=
wl0_maclist=00:0D:88:BD:C1:C4 00:00:00:00:00:00
13_x_BRestrict=1
5_x_AccessConcentrator=
sdram_init=0x0419
16_x_WSense=1
7_DmzDevices=802.11g only
7_WanDmzRuleCount=0
5_x_IdleTime1=1800
5_Password=
dl_ram_addr=a0001000
5_x_IdleTime2=1800
13_x_APMode=1
4_PortMappingProtocol=
4_ConnectionStatus=
7_DmzLanICMP=
5_UserName=
5_x_PPPoEMTU1=1492
7_WanLanProFlag=
5_x_PPPoEMTU2=1492
8_RipSRouteIP=
regulation_domain=0X30DE
wl0_radius_key=
7_DmzLanSrcPort=
wl0_corerev=2
16_x_WPort=7777
wl0_channel=8
10_WEPType=None
7_LanWanRuleCount=0
5_ConnectionStatus=
4_autofwDesc=
2_x_ConnectionMDI=0
7_SystemCmd=
7_WanDmzProFlag=
7_WanLanSrcPort=
8_RipRedistStatic=0
7_WanLanSrcIP=
11_AESMethod=
7_UrlListCount=0
wl0_auth_mode=disabled
et1phyaddr=0
16_x_WImageSize=1
10_x_AESEnable=0
16_x_WAttach=1
boardnum=asusX
10_x_BlockBCSSID=0
wan_proto_ex=static
16_x_FPort=21
14_ACLListCount=0
9_DmzDomainName=
8_StaticGW=
8_RipTimeout=180
11_AESMacAddr=
7_WanLanICMP=
8_GWStaticIP=
7_WanDmzSrcPort=
9_x_LANDHCPClient=1
5_x_WANSubnetMask=
12_AuthDBSecret=
7_DmzWanProFlag=
4_PortMappingDescription=
16_x_WRemote=LAN Only
d-i netcfg/choose_interface select eth1
d-i netcfg/get_ipaddress string 192.168.177.251
d-i netcfg/get_netmask string ""
d-i netcfg/get_gateway string 192.168.177.1
d-i netcfg/confirm_static boolean true
d-i netcfg/disable_dhcp boolean true
parse_bcm947xx_nvram "$(cat $TEST_DIR/wl500.nvram-text)"
parse_wl500_nvram_web_manager "$(cat $TEST_DIR/wl500.nvram-text)"
generate_preseed_file "$1"
This diff is collapsed.
d-i netcfg/choose_interface select vlan1
d-i netcfg/get_ipaddress string 12.345.240.33
d-i netcfg/get_netmask string 255.255.252.0
d-i netcfg/get_gateway string 12.345.240.1
d-i netcfg/get_nameservers string 144.140.70.30 144.140.71.30 144.140.71.16
d-i netcfg/confirm_static boolean true
d-i netcfg/disable_dhcp boolean true
d-i netcfg/get_hostname string wl500gx
d-i netcfg/get_domain string rwhitby.net
parse_bcm947xx_nvram "$(cat $TEST_DIR/wl500gd.nvram-text)"
generate_preseed_file "$1"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment