network 525 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/bin/sh /etc/rc.common
  2. START=20
  3. STOP=90
  4. SERVICE_DAEMONIZE=1
  5. SERVICE_WRITE_PID=1
  6. start() {
  7. stop
  8. [ -e /proc/sys/kernel/core_pattern ] && {
  9. ulimit -c unlimited
  10. echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
  11. }
  12. service_start /sbin/netifd
  13. setup_switch() { return 0; }
  14. include /lib/network
  15. setup_switch
  16. sleep 1
  17. /sbin/wifi up
  18. }
  19. restart() {
  20. ifdown -a
  21. sleep 1
  22. start
  23. }
  24. shutdown() {
  25. ifdown -a
  26. stop
  27. }
  28. stop() {
  29. service_stop /sbin/netifd
  30. }
  31. reload() {
  32. ubus call network reload
  33. /sbin/wifi up
  34. }