Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Where to place additional network commands for boot?

    I need to issue a bunch of commands during boot to create and configure several tun/taps with tunctl and then bridge them and a physical connection via brctl. I have a script working well to accomplish this (albeit without any error checking), but where should I place this to have it automatically occur on boot?

  2. #2
    Linux Guru dylunio's Avatar
    Join Date
    Aug 2004
    This can change from distr to distro, though they are in either /etc/rc.d/rc.3
    /etc/rc.3 /etc/init.d or /etc/init.d/rc.3
    Registered Linux User #371543!
    Get force-get May The Source Be With You

  3. #3
    thanks for the tip, lead me to find the right place

    Under sw10.1 it's /etc/rc.d/rc.inet1 and rc.inet2 for all network related scripts. I opted to place most of my script in rc.inet2 since the tun/tap devices are only linked to the operation of uml's that will eventually be scripted into that startup too.

    rc.inet1.conf contains the nic configuration bits, so I used that to settup the (three) physical nics.

    Inside rc.inet2 I added scripting to create and configure 4 tun/tap devices, and add them and two of the nics to two different bridges.
    While I was at it I added some really basic error checking to my script and now voila, it configures everything on boot.

  4. $spacer_open
  5. #4
    Linux User Krendoshazin's Avatar
    Join Date
    Feb 2005
    London, England
    During boot as in pre-login, use /etc/rc.d/rc.local you can add your commands here without having to modify the others

  6. #5
    Linux Newbie
    Join Date
    Apr 2005
    CT --> PA
    Quote Originally Posted by Krendoshazin
    During boot as in pre-login, use /etc/rc.d/rc.local you can add your commands here without having to modify the others
    and it provides continuity between runlevels. If you put it in RC.3 and then for some reason booted RC.4, you'd be missing what you needed. rc.local is the best bet.
    Chicks dig giant mechanized war machines

Posting Permissions

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