Announcement

Collapse
No announcement yet.

How do I automate the following 3 commands?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How do I automate the following 3 commands?

    I finally got my wireless to work but I have to do the following commands everytime I start up:

    sudo ifconfig wlan0 192.168.1.41

    sudo route add default gw 192.168.1.1

    sudo iwconfig wlan0 key abcdefg


    If I use Wireless Assistant or WICD to do this I lock up the computer.

    If I use Configure Network Connections it always forgets the default route or sets the static IP back to 169.xx.xx.xx.

    thnx
    John

    #2
    Re: How do I automate the following 3 commands?

    why don't you try editing the /etc/network/interfaces like below
    Code:
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # This is a list of hotpluggable network interfaces.
    # They will be activated automatically by the hotplug subsystem.
    mapping hotplug
        script grep
        map wlan0
    
    # The primary network interface
    auto wlan0
    iface wlan0 inet static
        address 192.168.1.41
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.1.1
    credit goes to this page http://codesnippets.joyent.com/posts/show/319
    hth

    Comment


      #3
      Re: How do I automate the following 3 commands?

      Thanks, that seemed to automate everything except for the

      sudo iwconfig wlan0 key aabcdefghij



      Can I add this in the same file?

      Comment

      Working...
      X