Find the answer to your Linux question:
Results 1 to 2 of 2
I want to make a script so that it creates a network bridge when I boot linux. The commands are: Code: ifconfig eth1 0.0.0.0 ifconfig eth0 0.0.0.0 brctl addbr br0 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2004
    Posts
    7

    Help writing a start-up script.


    I want to make a script so that it creates a network bridge when I boot linux. The commands are:
    Code:
    ifconfig eth1 0.0.0.0
    ifconfig eth0 0.0.0.0
    brctl addbr br0
    brctl addif br0 eth1
    brctl addif br0 eth0
    ifconfig bro up
    dhclient br0
    Can someone help me with this? Thanks in advance for your help.

  2. #2
    Just Joined!
    Join Date
    Jan 2005
    Posts
    3
    make a file say file.Name
    change file.Name to something relevent such as ifinit.sh
    put this chunk of code into the file:
    Code:
    #!/bin/sh
    ifconfig eth1 0.0.0.0
    ifconfig eth0 0.0.0.0
    brctl addbr br0
    brctl addif br0 eth1
    brctl addif br0 eth0
    ifconfig bro up
    dhclient br0
    then
    Code:
    chmod 700 file.Name
    These next steps are for debian:
    Then place this file into the init directory:
    Code:
    mv file.Name /etc/init.d/
    and add a link in /etc/rcS.d
    Code:
    ln -s /etc/init.d/file.Name /etc/rcS.d/S50file.Name

Posting Permissions

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