The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Restart Network on Startup

    Discussion in 'Linux Compatibility and Software' started by millermagic, May 2, 2010.

  1. millermagic

    millermagic Rockin the pinktop

    Reputations:
    330
    Messages:
    1,742
    Likes Received:
    0
    Trophy Points:
    55
    For some reason my Ubuntu Server requires me to run /etc/init.d/networking restart each time I turn it on. I'm not sure why, but it does.

    I have the following shell script called network.sh
    Code:
    #/bin/bash
    #Shell script to restart network dameon on computer start
    
    echo "restarting network daemon"
    
    /etc/init.d/networking restart

    First - is this okay? Will it work?
    Second - How do I make this automatically run on startup?
     
  2. helikaon

    helikaon Notebook Consultant

    Reputations:
    269
    Messages:
    288
    Likes Received:
    0
    Trophy Points:
    30
    Hi,
    don't know what your prob is - can even be some active part after server (switch, router ...) loose cable, bad netmask ...lots reasons.
    Anyway, if you want to do this - restart network after server is up - you need to make your own '/etc/init.d' script. Its a bit lengthy explanation, so you better google it. Or you can add the script, or things you want to run at the end of boot process to rc.local file.
    How to do that is e.g. here:
    https://help.ubuntu.com/community/RcLocalHowto

    gl&hf
     
  3. Thomas

    Thomas McLovin

    Reputations:
    1,988
    Messages:
    5,253
    Likes Received:
    0
    Trophy Points:
    205
    OR....he could just add this to /etc/rc.local

    Code:
    /etc/init.d/networking restart
     
  4. helikaon

    helikaon Notebook Consultant

    Reputations:
    269
    Messages:
    288
    Likes Received:
    0
    Trophy Points:
    30
    Yeah, that's right, but as i understand it (dunno, since i don't use it - just read it somewhere..), *buntu doesn't have this file - that's why I posted the link there about rc.local howto :)
     
  5. timberwolf

    timberwolf Notebook Consultant

    Reputations:
    131
    Messages:
    288
    Likes Received:
    0
    Trophy Points:
    30
    Xubuntu 10.04 has an /etc/rc.local file. As a Debian user, I sometimes install Ubuntu on a Qemu virtual machine just to remind myself that it is still Debian underneath the covers. ;)