net-dialup/wvdial does not contain an init script. Here is one that I wrote. Any suggestions would be welcome. It might be a good idea to include this with the package. ---------------------------------------------------------- #!/sbin/runscript # # $Id: net.wvdial,v 1.3 2004/07/27 18:35:08 rouslan Exp $ # depend() { need slmodem } checkinstalled() { PATH=/bin:/usr/bin:/sbin:/usr/sbin which wvdial >/dev/null if [ $? != 0 ] then eerror "Please install wvdial." return 1 fi } checkconfigured() { PATH=/bin:/usr/bin:/sbin:/usr/sbin find /etc/wvdial.conf >/dev/null if [ $? != 0 ] then eerror "Configaration file /etc/wvdial.conf is missing." eerror "Please run \"wvdialconf\" to configure wvdial." return 1 fi } checkinterfaceup() { PATH=/bin:/usr/bin:/sbin:/usr/sbin ifconfig | grep ppp >/dev/null if [ $? == 0 ] then eerror "PPP interface is already up." return 1 fi } checkall() { checkinstalled || return 1 checkconfigured || return 1 checkinterfaceup || return 1 } checkstarted() { PATH=/bin:/usr/bin:/sbin:/usr/sbin ifconfig | grep ppp >/dev/null eend $? } start() { checkall || return 1 ebegin "Starting wvdial" start-stop-daemon --start --quiet --background --exec /usr/bin/wvdial \ -- "$OPTIONS" # Because of "background" option, we cannot get a return status of # wvdial. It usually starts in about 30 to 40 seconds. sleep 40 checkstarted } stop() { ebegin "Stopping wvdial" start-stop-daemon --stop --quiet --exec /usr/bin/wvdial eend $? # It takes a few seconds for wvdial to disconnect. sleep 5 } ------------------------------------------------------------ Enjoy using it. Reproducible: Always Steps to Reproduce:
BTW, "need slmodem" line is only required for net-dialup/slmodem ~x86 users. Comment it out if you are not one.
Created attachment 36561 [details, diff] Timers to wait for wvdial. "need slmodem" is now optional.
Created attachment 36562 [details] The patched wvdial init script This is the wvdial init script with the previous patch (Attachment 36561 [details, diff]) applied.
Created attachment 36563 [details] /etc/conf.d/net.wvdial - wvdial init script configuration This is the configuration file for wvdial init script. It containts variables ${OPTIONS} and ${SLMODEM}. The first one is options to pass to wvdial (e.g., "phone2"). The second one is whether or not to be dependant on slmodem.
Created attachment 36685 [details] The version of script marked "Stable" This init script now does what it is supposed to do and does it nicely. Check it out -- you will like it. :D
Created attachment 36686 [details] Configuration for the "Stable" init script
Created attachment 36736 [details, diff] Some bug fixes and enhancements Added a check for wvdial quitting unexpectedly wheb there's no dial-tone. Made the pid file configurable from the top of the init script. Now, only trying to kill wvdial if it still runs.
Created attachment 36737 [details] The patched script The init script with the previous patch (Attachment 36736 [details, diff]) applied.
Created attachment 36828 [details, diff] Simplified calculation of STOP/START_STRING_LEN
Created attachment 36861 [details] Ignore this
Comment on attachment 36861 [details] Ignore this Ooops! wrong file :D
Created attachment 36862 [details] Init script with the above patch
There is already a script (net.ppp) which launch a dial-up connection. Don't see why we should add another script for that, dependent by additional programs. wvdial's users want to use it as a dialer, not as a daemon.
rejected for the reason exposed in comment #13