Find the answer to your Linux question:
Results 1 to 2 of 2
hello i need to know exactly how to write a script that will during bootup with root access run the following ifconfig eth0 up iwconfig eth0 key xxxxxxxxxxxxx dhclient eth0 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2005
    Posts
    2

    script to setup eth0 at bootup mandrake 10.1


    hello
    i need to know exactly how to write a script that will during bootup with root access run the following

    ifconfig eth0 up
    iwconfig eth0 key xxxxxxxxxxxxx
    dhclient eth0

    i need to know how to write the script exactly and also how to call it at bootup.

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    The script would be:
    Code:
    #!/bin/bash
    ifconfig eth0 up
    iwconfig eth0 key xxxxxxxxxxxxxx
    dhclient eth0
    Let's say you name this "wireless". Now issue the command:
    Code:
    chmod +x wireless
    You'll want to put this in /etc/rc5/d, as runlevel 5 is the mdk default:
    Code:
    cp wireless /etc/rc5./
    reboot, and it should work
    -lakerdonald

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •