Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
start and stop a tree of services
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
schorsch_76
Apprentice
Apprentice


Joined: 19 Jun 2012
Posts: 294

PostPosted: Wed Jul 09, 2014 5:48 am    Post subject: start and stop a tree of services Reply with quote

Hi,

now as i got my two hostapds running [1] i want to solve the next issue. I have a USB device for a network card to work as the interface for the ppp daemon. I set up openrc
Code:

rc_hotplug="*"
rc_stop_crashed_services="Yes"
rc_start_crashed_services="YES"


in /etc/udev/rules/70-persistent-net.rules i did a RUN+="/etc/init.d/net.ppp0 start" and RUN+="/etc/init.d/net.ppp0 stop" at the add/remove action lines of my eth3 device.

My final goal is, that the shorewall, ppp0, dnsmasq and co start and stop if i attach my devices.

For example the net.eth3 service starts and stops, but it doesn't start my net.ppp0 service from the eudev rule. From the wiki [2][3] i dont get much info what i can do now. I know, if i do a manual "rc", after attaching the usb device, it starts the services like they are define in runlevel "default".

@skarnet: Could i solve this with s6? Can s6 stop and start a tree of services, if for example, net.eth3 goes away where shorewall/net.ppp0/dnsmasq and others rely on?

[1] https://forums.gentoo.org/viewtopic-t-994626.html
[2] http://wiki.gentoo.org/wiki/OpenRC
[3] http://wiki.gentoo.org/wiki/Iphone_USB_Tethering#udev_trigger
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2982

PostPosted: Wed Jul 09, 2014 11:16 am    Post subject: Reply with quote

schorsch_76 ...

You can create a (stacked) runlevel with these services and have udev run this on card insertion. See this post for an example.

best ... khay
Back to top
View user's profile Send private message
schorsch_76
Apprentice
Apprentice


Joined: 19 Jun 2012
Posts: 294

PostPosted: Wed Jul 09, 2014 11:32 am    Post subject: Reply with quote

Thanks! i will take a look at it!
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2982

PostPosted: Wed Jul 09, 2014 11:20 pm    Post subject: Reply with quote

schorsch_76 wrote:
Thanks! i will take a look at it!

schorsch_76 ... you're welcome ... ask if you have any problems or questions.

best ... khay
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum