diff options
author | John Crispin <john@openwrt.org> | 2012-10-17 22:45:58 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2012-10-17 22:45:58 +0000 |
commit | a34499e09569241a21203c1327f3bfa8a888584f (patch) | |
tree | 9365698437d0b2ef8cfe715d9c9e8d5434d63353 /package/network/config/swconfig/files | |
parent | 965710d3e17738006bb22f01584cfe56319ceac1 (diff) | |
download | mtk-20170518-a34499e09569241a21203c1327f3bfa8a888584f.zip mtk-20170518-a34499e09569241a21203c1327f3bfa8a888584f.tar.gz mtk-20170518-a34499e09569241a21203c1327f3bfa8a888584f.tar.bz2 |
move lots of kernel related packages to the new system/ folder
SVN-Revision: 33830
Diffstat (limited to 'package/network/config/swconfig/files')
-rw-r--r-- | package/network/config/swconfig/files/switch.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/package/network/config/swconfig/files/switch.sh b/package/network/config/swconfig/files/switch.sh new file mode 100644 index 0000000..18d5fbd --- /dev/null +++ b/package/network/config/swconfig/files/switch.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# Copyright (C) 2009 OpenWrt.org + +setup_switch_dev() { + config_get name "$1" name + name="${name:-$1}" + [ -d "/sys/class/net/$name" ] && ifconfig "$name" up + swconfig dev "$name" load network +} + +setup_switch() { + config_load network + config_foreach setup_switch_dev switch +} |