[GRLUG] Shell scripting advice

Michael Mol mikemol at gmail.com
Tue Dec 19 08:08:06 EST 2006


On 12/18/06, Jorge La <weeneedhelp at gmail.com> wrote:
> the card work! :D
> but, everytime I start Ubuntu, i have to type in "sudo iwconfig eth1 essid
> Jorge key 1337" and then "sudo dhclient"
> so i decided do something new and write a shell script! here it is:
>
> > #!wireless
> > iwconfig eth1 essid Jorge key 1337
> > dhclient"
>
> and i want it to  go  at start up. so i should place it in /etc/init.d/ and
> run update-rc.d wireless defaults.
>
> but, how do i make that script root? (or, how do i make that script at all?)
> LOL
>
>

"chown" can be used to make the script root.

Also change this line:
  dhclient
to this one:
  dhclient eth1

But, really, it's probably preferable to put the commands in the
scripts found under /etc/network/interfaces.

-- 
:wq


More information about the grlug mailing list