DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5909
|
Posted: Sat Feb 23, 2013 2:42 pm Post subject: help with service file |
|
|
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 |
|