Re: Script to connect to internet at bootup



On Sat, Mar 5, 2011 at 3:48 AM, Olivier Cailloux
<olivier.cailloux@xxxxxxxxx> wrote:
Also the script works if I set a delay of 15 seconds before running it. But
I'd like to find some clean way of configuring this, that is, I'd like to be
able to specify to run the script only when "everything needed" (meaning, I
guess: the DNS system) is ready. That's why I thought I'd use the dependency
mechanism of init.d (see above the original post), but there may exist
better approaches.
Olivier

So, you are correct. It's timing issue. Delaying the script makes it work.
Well, if you don't want to use the delay method, we can use command to
resolve something, and if it doesn't succeed, keep trying until
successful, then run the authenticate script.

Some example I found in the net:
WGET="/usr/bin/wget" $WGET -q --tries=10 --timeout=5
http://www.google.com -O /tmp/index.google &> /dev/null if [ ! -s
/tmp/index.google ];then echo "no" else echo "yes" fi

Read more: http://www.linuxscrew.com/2009/04/02/tiny-bash-scripts-check-internet-connection-availability/#ixzz1FgTn9iYo

Also, I think better write all those thing in a separate script and
call it through rc.local instead for tidiness.

--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



Relevant Pages

  • kbuild make deb patch
    ... +# Simple script to generate a deb package for a Linux kernel. ... +# make clean Delete all automatically generated files, ...
    (Linux-Kernel)
  • Re: What should I do with std.textio.all of ModelSim
    ... I don't use the Modelsim GUI for compilation because ... My point was, that if you write a script, you are in control. ... It is a good idea to clean out the work directory ...
    (comp.arch.fpga)
  • Re: importing text file to access
    ... This sort of thing usually isn't too hard to handle with a little script ... or a custom import routine, but it's necessary to know just what "other ... >I will need to filter or clean up the data to leave only ... >>From To Duration Activity ...
    (microsoft.public.access.externaldata)
  • Re: MSN Messenger wont stop "starting"
    ... It looks like a script file, but it popped up from the internet in a notepad ... I sent it off to Symantec for analysis, and it came back clean. ... >> Hi Chris, ... Outlook Express will start it as well. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: How to clean up text pasted from web sites
    ... > I used to use Wordstar to clean up and adjust the text to my preferred ... > I'd like to be able to do that with a script. ... The fmt command will adjust line lengths to whatever you want ... or could use suggestions from the spell checker ...
    (comp.unix.shell)