Re: [systemd-devel] Execute custom command whenever network interface appears

2015-02-03 Thread Lennart Poettering
On Sun, 14.12.14 11:50, DimanNe (dima...@ya.ru) wrote:

> Hello,

> I read manual about systemd-networkd module
> (http://www.freedesktop.org/software/systemd/man/systemd.network.html),
> and as far as I know, I can do only basic actions (like run dhcp, or
> assign static addresses/mac/routes and so on), but in general I want
> to run some script or command.
> 
> Here is real world example - 
> https://wiki.archlinux.org/index.php/ZTE_MF_823_(Megafon_M100-3)_4G_Modem
> If you are using usb modem, you should
> 1) run dhcp
> 2) run curl/wget with special url
> 
> so, my question, it it possible just now (how?)? If not, what is the best 
> approach to accomplish described above task?

No, this is currently not supported, and it is unlikely that we ever
will. In general we are not really convinced that doing callouts from
lower layers into higher layers of the stack is something to support.

If you want to do something like this make the higher stack subscribe
to changes from the lower stack. In scripts you can use
systemd-networkd-wait-online for that, to a certain level...

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Execute custom command whenever network interface appears

2014-12-14 Thread DimanNe
Hello,
I read manual about systemd-networkd module 
(http://www.freedesktop.org/software/systemd/man/systemd.network.html), and as 
far as I know, I can do only basic actions (like run dhcp, or assign static 
addresses/mac/routes and so on), but in general I want to run some script or 
command.

Here is real world example - 
https://wiki.archlinux.org/index.php/ZTE_MF_823_(Megafon_M100-3)_4G_Modem
If you are using usb modem, you should
1) run dhcp
2) run curl/wget with special url

so, my question, it it possible just now (how?)? If not, what is the best 
approach to accomplish described above task?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel