Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
help with service file
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
DaggyStyle
Advocate
Advocate


Joined: 22 Mar 2006
Posts: 4883

PostPosted: Sat Feb 23, 2013 2:42 pm    Post subject: help with service file Reply with quote

hello,

I have a bridge with 4 taps on my setup, I want to auto start only one tap in startup and start the rest on demand.

it seems that this cannot be done via config so I'm trying to get it to work via another service file, here it is:
Code:

#!/sbin/runscript

depend() {
        after net.br0
}

start() {
        ebegin "Shutting down uneeded taps"
        rc-config stop $(grep config_tap /etc/conf.d/net | sed 's/^config_/net./g;s/=.*$//g' | sort -n | sed '$ d' | xargs)
        eend $?
}

stop() {
        exit 0
}

restart() {
        stop
        start
}


when I run the cmd in bash it works well, e.g. the taps are shutting down. but when I run the service file, all related services including the actual bridge are shutting down. how can I mimic the same behavior as I run the in cli within the service file?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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