I have two scripts under /etc/hotplug.d/iface
to play sounds thru the PC speaker when the WAN (pppoe-wan
) interface goes up and down but they're not working.
What am I missing and do filename's matter?
root@apu:~# cat /etc/hotplug.d/iface/99-ifupwan
#!/bin/sh
[ "$ACTION" = "ifup" -a "$INTERFACE" = "pppoe-wan" ] && {
/usr/bin/beep -f 130 -l 100 -n -f 262 -l 100 -n -f 330 -l 100 -n -f 392 -l 100 -n -f 523 -l 100 -n -f 660 -l 100 -n -f 784 -l 300 -n -f 660 -l 300 -n -f 146 -l 100 -n
}
exit 0
root@apu:~# cat /etc/hotplug.d/iface/99-ifdownwan
#!/bin/sh
[ "$ACTION" = "ifdown" -a "$INTERFACE" = "pppoe-wan" ] && {
n=3000; while [ $n -gt 400 ]; do /usr/bin/beep -f $n -l 5; n=$((n*97/100)); done
}
exit 0