You are not logged in.
what i mean is, can i do something like this in the daemons array in rc.conf or elsewhere:
(...network @(adsl firestarter) @nvidia....)
so that the daemons adsl and firestarter, *as a pair*, will be backgrounded during startup, but where firestarter will only start loading after adsl has loaded (which takes about 10 secs). i use firestarter for nat, but nat doesnt work if adsl and firestarter are async in daemons array.
currently i have
... adsl @firestarter ....
would be nice if this is implemented in rc.conf...
Offline
That's a severe complication - as far as I know, you shouldn't have to be connected to start network daemons... I know sshd starts fine before network.
Offline
Why not background both adsl and firestarter, and put
/etc/rc.d/firestarter restart
in /etc/ppp/ip-up ?
Offline
hey thanks, i didnt know about that. but should it not just be "/etc/rc.d/firestarter start" in ip-up, and no firestarter in daemons array? but i guess makes no difference from user's POV.
Offline
hey thanks, i didnt know about that. but should it not just be "/etc/rc.d/firestarter start" in ip-up, and no firestarter in daemons array? but i guess makes no difference from user's POV.
No, because if you lose your connection (lose sync, etc.), ip-up will be run again when you reconnect.
You could stop your firewall from /etc/ppp/ip-down if you want, but actually it's better to just restart your firewall from ip-up and leave the firewall in the rc.conf DAEMONS array -- you generally want to have your firewall on all the time so there's no window of opportunity between connection and firewall up.
If you want to be really paranoid, you should really start your firewall (NOT backgrounded) in rc.conf BEFORE adsl.
Offline
ok, i have gained more understanding
Offline
Why not background both adsl and firestarter, and put
/etc/rc.d/firestarter restart
in /etc/ppp/ip-up ?
it actually does not work, and im back to manually restarting firestarter whenever the connection drops. does the adsl daemon call ip-up? adsl daemon is part of the roaring penguin pppoe package.
i tried manually restarting with "/etc/rc.d/adsl restart". i also tried pppoe-stop, pppoe-start. same effect, the firewall stops and does not go back up.
Offline
You could combine them into one daemon.
Offline
try adding to firestarter:
ck_daemon adsl && /etc/rc.d/adsl start
and remove adsl from the daemons array.
Freedom is what i love
Offline
eh? how do i combine them into one daemon?
Blaasvis , where do i add that line? i also start firestarter in daemons array.
the firestarter docs say that firestarter needs to be loaded after the network interface (in this case, ppp0) is already up, so im looking for a way to restart firestarter whenever the connection drops and then gets reconnected.
there is an option for just that in firestarter itself, but it doesnt work either; the firestarter docs also say that it might not work in all cases...
Offline
eh? how do i combine them into one daemon?
Go check your adsl daemon script in /etc/rc.d/adsl. Observe it. Open the firestarter daemon in another terminal. Now create a new daemon in /etc/rc.d which combines both. It's quite obvious howto when observing the existing scripts.
Offline
/etc/rc.d/adslfirestarter
#!/bin/bash
case "$1" in
start)
/etc/rc.d/adsl start
/etc/rc.d/firestarter start
;;
stop)
/etc/rc.d/firestarter stop
/etc/rc.d/adsl stop
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0
That'd probably work.
Offline
alternatively you could just start them one by one.. is the difference really that much?
Offline
thanks for the tips very much, i didnt realize they were actually scripts that i could edit in a text editor... i will try that.
alternatively you could just start them one by one.. is the difference really that much?
the problem is that i use firestarter to share internet with a second PC. whenever the connection drops firestarter disables itself, so that upon reconnection, second PC will no longer have internet access. anyone using second PC has to go to router PC to restart firestarter manually.
edit: im sorry, i guess my concerns have evolved from original topic. i was only initially concerned with reducing startup time, but now i have realized that the above is a problem as well, so... :oops:
Offline
hmm, but the pppoe connection is set to automatically restore itself whenever it gets cut off from my isp. i guess it is currently impossible to get reconnection+firestarter-restart fully automated, because in the case of combining firestarter and adsl in one script, i will still have to call that combo-script manually.
i guess this is not a limitation if i just use iptables? i dont have to worry about NAT getting disabled?
Offline
(i guess maybe this thread should be moved to networking section)
newbie question:
in /etc/ppp/ip-up, do i need to add just
/etc/rc.d/firestarter restart
? nothing more, no "exit 0" or curly braces or whatever?
Offline
it actually does not work, and im back to manually restarting firestarter whenever the connection drops. does the adsl daemon call ip-up? adsl daemon is part of the roaring penguin pppoe package.
i tried manually restarting with "/etc/rc.d/adsl restart". i also tried pppoe-stop, pppoe-start. same effect, the firewall stops and does not go back up.
what does manually doing a "/etc/rc.d/firestarter restart" do (while the firewall is up and working)? it seems to me that this must be the problem, because I know for sure that pppoe calls /etc/ppp/ip-up when it gets an IP address -- I have DSL and use /etc/ppp/ip-up to do all sorts of things, one of which is restart my firewall (though I use shorewall, not firestarter).
if "/etc/rc.d/firestarter restart" does not work properly, you might need to file a bug report about it....
Offline
(i guess maybe this thread should be moved to networking section)
newbie question:
in /etc/ppp/ip-up, do i need to add just/etc/rc.d/firestarter restart
? nothing more, no "exit 0" or curly braces or whatever?
yes, that's right, though more traditional rc.* style would be
if [ -x /etc/rc.d/firestarter ]; then
/etc/rc.d/firestarter restart
fi
No "exit 0" statement is needed in ip-up.
Offline