Misc network fixes so we work on my stable server. Splash plugin removed as splashtuils-1.4 now ships with its own.

This commit is contained in:
Roy Marples
2007-04-10 10:33:44 +00:00
parent c5ddc6ef74
commit 0c98067d57
11 changed files with 89 additions and 298 deletions

View File

@@ -7,21 +7,6 @@ iproute2_depend() {
after ifconfig
}
_get_mac_address() {
local mac=$(LC_ALL=C ip link show "${IFACE}" | sed -n \
-e 'y/abcdef/ABCDEF/' \
-e '/link\// s/^.*\<\(..:..:..:..:..:..\)\>.*/\1/p')
case "${mac}" in
00:00:00:00:00:00) ;;
44:44:44:44:44:44) ;;
FF:FF:FF:FF:FF:FF) ;;
"") ;;
*) echo "${mac}"; return 0 ;;
esac
return 1
}
_up() {
ip link set up dev "${IFACE}"
@@ -55,6 +40,26 @@ _is_wireless() {
grep -Eq "^[[:space:]]*${IFACE}:[[:space:]]+" /proc/net/wireless
}
_get_mac_address() {
local mac=$(LC_ALL=C ip link show "${IFACE}" | sed -n \
-e 'y/abcdef/ABCDEF/' \
-e '/link\// s/^.*\<\(..:..:..:..:..:..\)\>.*/\1/p')
case "${mac}" in
00:00:00:00:00:00) ;;
44:44:44:44:44:44) ;;
FF:FF:FF:FF:FF:FF) ;;
"") ;;
*) echo "${mac}"; return 0 ;;
esac
return 1
}
_set_mac_address() {
ip link set address "$1" dev "${IFACE}"
}
_get_inet_addresses() {
LC_ALL=C ip -family inet addr show "${IFACE}" | \
sed -n -e 's/.*inet \([^ ]*\).*/\1/p'
@@ -160,8 +165,9 @@ iproute2_pre_start() {
metric=1000
ebegin "Creating tunnel ${IFVAR}"
ip tunnel add "${tunnel}"
ip tunnel add ${tunnel} name "${IFACE}"
eend $? || return 1
_up
fi
return 0