Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- network={
- key_mgmt=NONE
- }
- rpi ~$ cat get_ip_addr.sh
- #!/bin/bash
- # wait 30 sec if interface gets online
- /lib/systemd/systemd-networkd-wait-online --interface=$1 --timeout=30 --quiet
- if [ $? -ne 0 ]; then
- exit 1
- else
- /sbin/ip -4 -br addr show $1 | /bin/grep -Po "d+.d+.d+.d+"
- fi
- rpi ~$ chmod +x get_ip_addr.sh
- rpi ~$ ./get_ip_addr.sh wlan0
- 192.168.4.37
- rpi ~$ ./get_ip_addr.sh xxx
- Event loop failed: Connection timed out
- rpi ~$
Add Comment
Please, Sign In to add comment