15-solos-init 483 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. dialog() {
  3. local tag="$(echo "$1" | cut -d= -f1)"
  4. local value="$(echo "$1" | cut -d= -f2-)"
  5. local response
  6. response="$(soloscli -s "$port" "$tag" "$value")"
  7. [ $? -ne 0 ] && {
  8. logger "soloscli($port): $tag '$value' returns $response"
  9. }
  10. }
  11. if [ "$ACTION" = "add" ]; then
  12. include /lib/network
  13. scan_interfaces
  14. case $DEVICENAME in
  15. solos-pci[0-3])
  16. port="${DEVICENAME#solos-pci}"
  17. device="solos${port}"
  18. config_list_foreach wan "$device" dialog
  19. ;;
  20. esac
  21. fi