admswswitch.sh 416 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. # Copyright (C) 2006 OpenWrt.org
  3. setup_switch_vlan() {
  4. config_get ports "$CONFIG_SECTION" "eth$1"
  5. ports=`echo "$ports"| sed s/" "/""/g`
  6. admswconfig eth$1 ${ports}c
  7. }
  8. setup_switch() {
  9. config_cb() {
  10. case "$1" in
  11. switch)
  12. option_cb() {
  13. case "$1" in
  14. eth*) setup_switch_vlan "${1##eth}";;
  15. esac
  16. }
  17. ;;
  18. *)
  19. option_cb() { return 0; }
  20. ;;
  21. esac
  22. }
  23. config_load network
  24. }