You are not logged in.

#1 2014-12-19 09:41:29

yuvadm
Member
From: Tel Aviv-Jaffa, Israel
Registered: 2012-08-08
Posts: 102
Website

netctl pre/post hooks

I'm going over the iPhone bluetooth tethering section on the wiki https://wiki.archlinux.org/index.php/IP … ing#netcfg and updating it to work with netctl.

All the parts are working, I'm just not sure how I can call pre/post connection hooks from netctl, they are not documented anywhere.

Any idea how I can go about this? This is requried since calls to bluez must be made to connect and disconnect from the BT device prior to setting up the network interface.

Offline

#2 2014-12-19 12:17:31

rsmarples
Member
Registered: 2009-05-12
Posts: 287

Re: netctl pre/post hooks

Does the interface actually exist before calling bluez? If so, you can do it from a dhcpcd hook - man dhcpcd-run-hooks for details about how to hook into the PREINIT event

Offline

#3 2014-12-19 13:02:58

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,489

Re: netctl pre/post hooks

Pre/Post expressions analogue to netcfg don't exist. If the interface exists, you can put an action similar to what rsmarples has written for dhcpcd into '/etc/netctl/interfaces/'. 
Even if the interface does not exist, you should be able to bring it up/down with a hook in '/etc/netctl/hooks/' (man netctl.profile).
Example: https://bbs.archlinux.org/viewtopic.php … 7#p1304367

Offline

Board footer

Powered by FluxBB