Date: Thu, 18 Jun 2015 08:05:34 +0200 From: Matthias Apitz <guru@unixarea.de> To: freebsd-questions@freebsd.org Subject: /etc/pccard_ether && assigning IP and routing Message-ID: <20150618060534.GA3970@c720-r276659>
next in thread | raw e-mail | index | archive | help
Hello, I own an Ubuntu phone BQ E4.5 and when I attach this on USB to my FreeBSD netbook the devd(8) launches /etc/pccard_ether ue0 start which works fine and the interface ue0 comes UP. I'd like to run an additional script to assign IP via dhcclient, establish a default route and restart sendmail. I do this manually as root with a script: #!/bin/sh # # change routing (...) to the Ubuntu phone BQ Aqaris E4.5 # ifconfig ue0 || { printf "interface ue0 not found -- exit.\n" exit 1 } ifconfig wlan0 down route delete default killall dhclient rm -f /etc/resolv.conf dhclient ue0 /etc/rc.d/sendmail stop sleep 3 /etc/rc.d/sendmail start I found no way with devd(8) hooks to run this script when interface ue0 comes up. Any ideas? Thanks in advance. matthias -- Matthias Apitz, guru@unixarea.de, http://www.unixarea.de/ +49-170-4527211 +49-176-38902045 "Wenn der Mensch von den Umständen gebildet wird, so muß man die Umstände menschlich bilden." "Si el hombre es formado por las circunstancias entonces es necesario formar humanamente las circunstancias", Karl Marx in Die heilige Familie / La sagrada familia (MEW 2, 138)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150618060534.GA3970>