From 4f2090ad48927532f42272c92c874cc370fc349b Mon Sep 17 00:00:00 2001 From: blogic Date: Wed, 17 Oct 2012 22:45:58 +0000 Subject: [kernel] move lots of kernel related packages to the new system/ folder git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33830 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/network/config/swconfig/files/switch.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 package/network/config/swconfig/files/switch.sh (limited to 'package/network/config/swconfig/files') diff --git a/package/network/config/swconfig/files/switch.sh b/package/network/config/swconfig/files/switch.sh new file mode 100644 index 000000000..18d5fbd2c --- /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 +} -- cgit v1.2.3