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 192.168.1.104 but not with my Domain Name... 404 page not found.

    This is driving me nuts!
     
  2. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    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.
    rebooted
    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

    http://ubuntu.igameilive.com/2009/04/custom-dns-server-and-ubuntu.html
     
  4. falko

    falko Super Moderator Howtoforge Staff

    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?
    Al
     
  6. falko

    falko Super Moderator Howtoforge Staff

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

    Al1937 New Member

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

    ../init.d/mydns
     
  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 Howtoforge Staff

    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

    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    DAEMON=/usr/local/sbin/mydns
    NAME=mydns
    DESC="DNS server"

    SCRIPTNAME=/etc/init.d/$NAME

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

    case "$1" in
    start)
    echo -n "Starting $DESC: $NAME"
    start-stop-daemon --start --quiet \
    --exec $DAEMON -- -b
    echo "."
    ;;
    stop)
    echo -n "Stopping $DESC: $NAME"
    start-stop-daemon --stop --oknodo --quiet \
    --exec $DAEMON
    echo "."
    ;;
    reload|force-reload)
    echo -n "Reloading $DESC configuration..."
    start-stop-daemon --stop --signal HUP --quiet \
    --exec $DAEMON
    echo "done."
    ;;
    restart)
    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
    ;;
    esac

    exit 0
     
  11. falko

    falko Super Moderator Howtoforge Staff

    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.
    Al
     
  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