wireless on an Ubuntu fileserver (no X) - auto connect possible?

Peter Garrett peter.garrett at optusnet.com.au
Tue Nov 21 07:37:09 UTC 2006


On Mon, 20 Nov 2006 22:22:19 +0000
Gabriel Dragffy <dragffy at yandex.ru> wrote:

> On Tue, 2006-11-21 at 09:00 +1100, Peter Garrett wrote:
> > You could put it in /etc/rc.local, which is run at the end of each
> > multi-user runlevel - which means runlevel 2 effectively in Ubuntu, since
> > anything higher would have to be a customised runlevel ( except 6 which is
> > "reboot", of course ).
> > 
> > Peter
> > 
> 
> Just copy the script in to there and everything is cool?
> 
If you read the file you'll notice it says to make it executable, of
course. By default it does nothing at all. You can also put your script
somewhere else - say, /etc/foo - and source it from /etc/rc.local .

On my laptop I call my (very simple) iptables script from there. I left
the comments in so it looks like this, now:
------------------------------------------------------------------------
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# Start iptables rules

. /etc/iptables.up

exit0
---------------------------------------------------------------------------------

Seems to work fine :)  
Peter




More information about the ubuntu-users mailing list