S14storemac 503 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides:
  4. # Short-Description: Store WLAN HW Address
  5. # Description: Store the WLAN HW Address for use by other scripts
  6. ### END INIT INFO
  7. . /opt/wz_mini/etc/rc.common
  8. storemac() {
  9. wait_for_wlan_wpa $(basename "$0")
  10. echo "#####$(basename "$0")#####"
  11. cat /sys/class/net/wlan0/address | tr '[:lower:]' '[:upper:]' > /opt/wz_mini/tmp/wlan0_mac
  12. echo "store original mac"
  13. }
  14. case "$1" in
  15. start)
  16. storemac
  17. ;;
  18. *)
  19. echo "Usage: $0 {start}"
  20. exit 1
  21. ;;
  22. esac