Permalink
Browse files

测试的不绑定的dhcp模式

  • Loading branch information...
1 parent 94d7c1a commit bb1123fbf3f6ac70302985777d457b4002339005 @mfs6174 committed Feb 19, 2012
Showing with 13 additions and 11 deletions.
  1. +6 −6 conf/default.script
  2. +2 −4 conf/network
  3. +5 −1 mentoinit.sh
View
@@ -65,7 +65,7 @@ setup_interface () {
local valid_gw=""
for i in $router ; do
- route add default gw $i ${user_metric:+metric $user_metric} dev $interface
+ #route add default gw $i ${user_metric:+metric $user_metric} dev $interface
valid_gw="${valid_gw:+$valid_gw|}$i"
done
@@ -89,14 +89,14 @@ setup_interface () {
[ -n "$dns" ] && [ "$dns" != "$old_dns" -o -n "$user_dns" ] && {
echo "udhcpc: setting dns servers: $dns"
- add_dns "$ifc" $dns
- echo "nameserver $dns" > /etc/resolv.conf
+ #add_dns "$ifc" $dns
+ #echo "nameserver $dns" > /etc/resolv.conf
# echo "nameserver $dns" > /tmp/resolv.conf.auto
[ -n "$domain" ] && [ "$domain" != "$old_domain" ] && {
echo "udhcpc: setting dns domain: $domain"
- sed -i -e "${old_domain:+/^search $old_domain$/d; }/^search $domain$/d" "${RESOLV_CONF}"
- echo "search $domain" >> "${RESOLV_CONF}"
- change_state network "$ifc" dnsdomain "$domain"
+ #sed -i -e "${old_domain:+/^search $old_domain$/d; }/^search $domain$/d" "${RESOLV_CONF}"
+ #echo "search $domain" >> "${RESOLV_CONF}"
+ #change_state network "$ifc" dnsdomain "$domain"
}
}
View
@@ -25,12 +25,10 @@ config 'interface' 'lan'
option 'proto' 'static'
option 'ipaddr' '192.168.1.1'
option 'netmask' '255.255.255.0'
- option 'ip6addr' 'fc00:0101:0101::1/64'
- option 'defaultroute' '0'
option 'nat' '1'
config 'interface' 'wan'
option 'ifname' 'eth1.1'
- option 'proto' 'dhcp'
- option 'type' 'bridge'
+ option 'proto' 'static'
+ option 'netmask' '255.255.255.0'
View
@@ -81,11 +81,15 @@ Version=$dv
DataFile=$df
">mentohust/mentohust.conf
if [ "$dm" = "1" ]; then
- echo "DhcpScript=udhcpc -r $2 -i br-wan" >> mentohust/mentohust.conf
+ echo "DhcpScript=udhcpc -r $2 -i eth1.1" >> mentohust/mentohust.conf
echo "#!/bin/sh
ifconfig eth1.1 down
ifconfig eth1.1 up
ifconfig eth1.1 hw ether $1
+route add default gw $5
+chmod +w /etc/resolv.conf
+cp /etc/resolv.conf.org /etc/resolv.conf
+chmod 444 /etc/resolv.conf
mento
">start.sh
else

0 comments on commit bb1123f

Please sign in to comment.