mydns-unexpected end of file

Discussion in 'Installation/Configuration' started by Al1937, Jun 28, 2009.

  1. Al1937

    Al1937 New Member

    When booting to Ubuntu server 9.04 I get :
    /etc/rc2.d/S20mydns unexpected end of file on line 56

    I have checked and double check the file for any errors. I do not see any.

    The file ends on line 55, why a reference to line 56?
    Line 56 is blank.

    Please help.

    I am brand new to ubuntu and trying to learn so excuse me for asking some silly questions.

    I am completely lost about a qualified Domain Name.
    I have researched Google, found many answers but still in the dark.
    Does the domain name need to be registered?
    Does it need to be hosted?

    I have xp pro on C drive and Ubunto on separate hard drive.

    I have 3 computer networked. I have PuTTy instaled on my Gateway, not on my Biostar , not on my Dell, which I am trying to setup Ubabuntu server, dual boot with XP Pro.

    Can someone explain how to setup a FQDN in detail?
    I can get Ispconfig3 and Squirrelmail to come up on my XP Pro computers using but not with my Domain Name... 404 page not found.

    This is driving me nuts!
  2. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    ls -la /etc/rc2.d/
    ? What's in /etc/init.d/mydns?

    Yes - unless you want to use it only in your LAN. But if people from outside should be able to connect, it needs to be registered.
  3. Al1937

    Al1937 New Member

    I did ls -la /etc/rc2.d and got a list of SxxXXXX files.
    S20mydns was missing.

    I found typo errors in vi /etc/init.d/mydns and corrected them.
    Now when I did a ls -la /etc/rc2.d
    The screen was entirely different.
    it showed Something, something root-root and S20mydns was listed.

    I still get the unexpected error on mydns line 56.
    Line 54 is exit ()
    line 55 is blank
    I can not go to line 56. It's not there!

    I am using a registered and hosted domain, I assume that's not right.
    I have other registered but not hosted domains. Is it a simple matter of using one of these?
    What else needs to be done to make it a FQDN?

    I came across a site about using openDNS and how to set it up using Ubantu desktop to change network DNS.

    Do I need to also install Ubantu Desktop
  4. falko

    falko Super Moderator ISPConfig Developer

    Can you post the outputs?
  5. Al1937

    Al1937 New Member

    Listing the output of ls -la /etc/rc2.d is is going to be difficult. It is huge and fills more then my screen.

    Is there an easy way to post the output?
  6. falko

    falko Super Moderator ISPConfig Developer

    Ok, then post the output of
    ls -la /etc/rc2.d/S20mydns 
  7. Al1937

    Al1937 New Member

    output of la -la /etc/rc2.d/S20mydns is

  8. Al1937

    Al1937 New Member

    Typo error first la should be ls

    ---How do I make my registered domain ( it is not hosted) a FQDN?
    I am still trying to figure this out.
  9. falko

    falko Super Moderator ISPConfig Developer

    What's in /etc/init.d/mydns?
  10. Al1937

    Al1937 New Member

    when I type /etc/init.d/mydns I get
    /etc/init.d/mydns: line 56: syntax error: unexpected end of file

    vi /etc/init.d/mydns output is

    #! /bin/sh
    # mydns Start the MyDNS server
    # Author: Philipp Kern <[email protected]>.
    # Based upon skeleton 1.9.4 by Miquel van Smoorenburg
    #<[email protected]> and Ian Murdock <[email protected]>.

    set -e

    DESC="DNS server"


    # Gracefully exit if the package has been removed.
    test -x $DAEMON || exit 0

    case "$1" in
    echo -n "Starting $DESC: $NAME"
    start-stop-daemon --start --quiet \
    --exec $DAEMON -- -b
    echo "."
    echo -n "Stopping $DESC: $NAME"
    start-stop-daemon --stop --oknodo --quiet \
    --exec $DAEMON
    echo "."
    echo -n "Reloading $DESC configuration..."
    start-stop-daemon --stop --signal HUP --quiet \
    --exec $DAEMON
    echo "done."
    echo -n "Restarting $DESC: $NAME"
    start-stop-daemon --stop --quiet --oknodo \
    --exec $DAEMON
    sleep 1
    start-stop-daemon --start --quiet \
    --exec $DAEMON -- -b
    echo "."
    echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
    exit 1

    exit 0
  11. falko

    falko Super Moderator ISPConfig Developer

    Is the file saved with Unix linebreaks or Windows linebreaks?
  12. Al1937

    Al1937 New Member

    The file "mydns" had to be written from scratch.
    When I first did a vi /etc/init.d/mydns the file did not exist.
    I entered "I" for insert. Typed in ithe code as per instruction from " The Perfect Server Ubuntu 9.0.4 ISPconfig3".
    When completed I hit ESC. entered :w then entered :q.
    That was it.

    I have decided to start installing from scratch and start the installation all over again. I do appreciate your help.
    I will let you know how I make out in a few days.
    Till then Thank You.
  13. Al1937

    Al1937 New Member

    I just finished reinstall "The Perfect Server Ubuntu 9.0.4 ISPConfig3"

    I figured out how to use PuTTy on my workstation and discovered that a copy and paste from the instructions to Putty works great. No more typos and hours of typing.

    AND NO MORE mydns error. I HAD to be doing something wrong before.

    Problem solved. I wish I knew what I had done to cause it.
    I still have FQDN problems but that's for another thread.
    Thanks again for helping me.
    Last edited: Jul 4, 2009

Share This Page