Root/target/linux/kirkwood/base-files/etc/uci-defaults/network

1#!/bin/sh
2#
3# Copyright (C) 2012 OpenWrt.org
4#
5
6[ -e /etc/config/network ] && exit 0
7
8set_lan_dhcp() {
9    local ifname=$1
10    uci batch <<EOF
11set network.lan='interface'
12set network.lan.ifname='$ifname'
13set network.lan.proto='dhcp'
14EOF
15}
16
17. /lib/functions/uci-defaults.sh
18. /lib/kirkwood.sh
19
20touch /etc/config/network
21
22ucidef_set_interface_loopback
23
24hardware=$(kirkwood_hardware_name)
25
26case "$hardware" in
27"Seagate FreeAgent DockStar")
28    set_lan_dhcp "eth0"
29    ;;
30
31"RaidSonic ICY BOX IB-NAS6210")
32    set_lan_dhcp "eth0"
33    ;;
34
35*)
36    ucidef_set_interface_lan "eth0"
37    ;;
38esac
39
40uci commit network
41
42exit 0
43

Archive Download this file



interactive