Networking Forums

Networking Forums > Computer Networking > Linux Networking > DNS2GO service script?

Reply
Thread Tools Display Modes

DNS2GO service script?

 
 
JonnieStyle
Guest
Posts: n/a

 
      03-26-2005, 04:42 PM
Hi folks,

I realize this has been talked about, but I still can't find out the
answer to my grief.
This script (which is commonplace for redhat and mandrake users) is
hanging immediately following
"Connecting to DNS2GO..."

....here's the script...

#!/bin/sh
#START OF SCRIPT
#Cut & paste in /etc/rc.d/init.d/dns2go

# dns2go This script starts or stops an DNS2GO connection

# description: Connects to Dynamic Name Server

# Source function library if it exists
test -r /etc/rc.d/init.d/functions && . /etc/rc.d/init.d/functions

prefix=/usr/local/bin
exec_prefix=${prefix}

# Paths to programs
START=${exec_prefix}/dns2go
STOP=${exec_prefix}/dns2go
STATUS="/bin/cat /var/dns2go/status.dat"
case "$1" in
start)
echo -n "Connecting to DNS2GO"

$START
if [ $? = 0 ] ; then
touch /var/lock/subsys/dns2go
echo_success
else
echo_failure
fi
echo ""
;;

stop)
echo -n "Shutting down DNS2GO link"

$STOP -k > /dev/null 2>&1
if [ $? = 0 ] ; then
rm -f /var/lock/subsys/dns2go
echo_success
else
echo_failure
fi
echo ""
;;

restart)
$0 stop
$0 start
;;

status)
$STATUS
;;

*)
echo "Usage: dns2go {start|stop|restart|status}"
exit 1
esac

exit 0

Now, if I run dns2go manually it fires up fine, but if I have it
running as a service, it hangs. Anybody run into this before?

Cheers.
 
Reply With Quote
 
 
 
 
David Efflandt
Guest
Posts: n/a

 
      03-27-2005, 01:56 PM
On 26 Mar 2005 09:42:13 -0800, JonnieStyle <(E-Mail Removed)> wrote:
> Hi folks,
>
> I realize this has been talked about, but I still can't find out the
> answer to my grief.
> This script (which is commonplace for redhat and mandrake users) is
> hanging immediately following
> "Connecting to DNS2GO..."


What order do you have the "S..." symlink to this script in rc#.d dir
(where # is runlevel). Are you attempting to run it before networking is
up or internet connection is established? Even if after that, you may
need to add a sleep statement to give it time to connect and update your
resolv.conf.

I use no-ip.com, and simply run its dns update client once (not as daemon)
from /etc/ppp/ip-up (which automatically runs whenever pppoe gets an IP).
If you are directly connected to cable modem, you could do similarly with
dhcp related scripts. Although, if behind a NAT router, you would need to
run a dynamic dns update client as a daemon.
 
Reply With Quote
 
ZoombyWoof
Guest
Posts: n/a

 
      03-27-2005, 06:30 PM
JonnieStyle wrote:
> Hi folks,
>
> I realize this has been talked about, but I still can't find out the
> answer to my grief.
> This script (which is commonplace for redhat and mandrake users) is
> hanging immediately following
> "Connecting to DNS2GO..."
>
> ...here's the script...
>
> #!/bin/sh
> #START OF SCRIPT
> #Cut & paste in /etc/rc.d/init.d/dns2go
>
> # dns2go This script starts or stops an DNS2GO connection
>
> # description: Connects to Dynamic Name Server
>
> # Source function library if it exists
> test -r /etc/rc.d/init.d/functions && . /etc/rc.d/init.d/functions
>
> prefix=/usr/local/bin
> exec_prefix=${prefix}
>
> # Paths to programs
> START=${exec_prefix}/dns2go
> STOP=${exec_prefix}/dns2go
> STATUS="/bin/cat /var/dns2go/status.dat"
> case "$1" in
> start)
> echo -n "Connecting to DNS2GO"
>
> $START
> if [ $? = 0 ] ; then
> touch /var/lock/subsys/dns2go
> echo_success
> else
> echo_failure
> fi
> echo ""
> ;;
>
> stop)
> echo -n "Shutting down DNS2GO link"
>
> $STOP -k > /dev/null 2>&1
> if [ $? = 0 ] ; then
> rm -f /var/lock/subsys/dns2go
> echo_success
> else
> echo_failure
> fi
> echo ""
> ;;
>
> restart)
> $0 stop
> $0 start
> ;;
>
> status)
> $STATUS
> ;;
>
> *)
> echo "Usage: dns2go {start|stop|restart|status}"
> exit 1
> esac
>
> exit 0
>
> Now, if I run dns2go manually it fires up fine, but if I have it
> running as a service, it hangs. Anybody run into this before?
>
> Cheers.

I had this problem as well. I start dns2go in rc.local, and on my old
system I have always started it with just "/usr/local/bin/dns2go" as the
last line in rc.local.
I upgraded my system to a 2.4 kernel and also upgraded dns2go to a newer
version, V2.0 and then I had the same symptom you have. I found out that
it didnt hang, but the process starting dns2go, in my case init, ran the
program instead of detach it. For some reason dns2go doesnt fork away or
whatever it did earlier, I had to explicitly put it in background, now
my entry in rc.local looks like this :
"/usr/local/bin/dns2go &"

Hope this helps.

/ZW
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
service logs in with local service account MS News Windows Networking 1 02-18-2008 08:04 PM
windows 2000 server Terminal service licensing service bharat Windows Networking 0 02-20-2007 09:01 PM
Copy files using filenames from text files with shell script or bash script altariamx2003@gmail.com Linux Networking 4 11-23-2006 08:27 AM
The Routing and Remote Access service terminated with service-specific error 193 Manu Windows Networking 0 07-10-2005 07:59 AM
Firewall Service/Winsock Redirector Service alternatives on Linux? Nil Einne Linux Networking 1 02-26-2004 05:16 PM



1 2 3 4 5 6 7 8 9 10 11