Results 1 to 3 of 3

Thread: Making a startup script for DHCP

  1. #1
    Join Date
    Oct 2008
    Location
    Chicago
    Beans
    148
    Distro
    Ubuntu UNR

    Making a startup script for DHCP

    Hey all, I'm setting up a image server at a company I work at. I want to set it up so that my fellow coworkers who are new to linux and terminal in general don't really have to do anything when they want to use Fog to image a set of computers. For my setup I need to DHCP to run. Normally when I need to use fog, before-hand I just run Sudo /etc/init.d/dhcp3-server start/stop to get things going. Apparently remembering this command in terminal is too difficult for them to do. So I want to make a startup script that starts DHCP as ubuntu boots. I've never made a start up script before. Can someone help? Or point me in the right direction to figure out how to do this?

    I tried using the start-up script application thing under system preferences, but I can't figure out how to give the start-up command root privileges in order for it to run.
    Last edited by PhilMize; September 22nd, 2010 at 04:08 PM.
    HP Mini 110 - UNR 9.10/Jolicloud Alpha Tester
    Lenovo Y510 - Windows 7/Linux Mint Gloria
    www.pcmuze.com - Blog
    www.Clevermodels.net - High Res Paper Models.

  2. #2
    Join Date
    Mar 2008
    Beans
    69

    Re: Making a startup script for DHCP

    If your not interested in a .bash_profile (google provides good links early) login script you should check these out:
    http://www.linux.com/archive/feature/114107
    Talks about your question. The rc#.d directories contains stuff to load at different runlevels.

    and
    http://wiki.df.dreamhosters.com/wiki..._at_startup.3F

  3. #3
    Join Date
    Oct 2008
    Location
    Chicago
    Beans
    148
    Distro
    Ubuntu UNR

    Re: Making a startup script for DHCP

    Ok thanx!

    Basically what I did was created 2 launchers. One is named "Start DHCP" and the other is named "Stop DHCP". Both icons on the desktop. For the commands I just pointed it to the script in the /ect/init.d/ called dhcp3-server and added Sudo at the begining and start/stop at the end of the command.

    So this way when they first boot the machine, all they have to do is click the "Start DHCP" icon, terminal pops up prompting for password input. They type it in, hit enter and there you go! Same goes for the "Stop DHCP" launcher icon.

    It's not a fabulous method but it works for now. Thanks!
    HP Mini 110 - UNR 9.10/Jolicloud Alpha Tester
    Lenovo Y510 - Windows 7/Linux Mint Gloria
    www.pcmuze.com - Blog
    www.Clevermodels.net - High Res Paper Models.

Bookmarks

Posting Permissions

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