I am running a minimal Ubuntu 13.04 on a BeagleBone. I try to disable udhcpd permanently, but I do not want to remove it. I want to be able to enable it when/if I need it. I have removed it from the rc.d by executing sudo update-rc.d -f udhcpd remove and I even cross verified that by installing and running sysv-rc-conf. After doing that, if I reboot, everything seems to work properly. I execute ps -e | grep udhcpd to verify that udhcpd hasn't started and indeed I get nothing. However, when I shutdown the system and turn it back on, udhcpd is back on! Any ideas on what and why is going on and how to solve this?


Still no clue on why this is happening, but a non-elegant solution that worked, i.e. killed all the instances of udhcpd at login was to write a simple bash script that locates the process IDs of the udhcpd and calls kill on them:

  1. Create a script file in /etc/profile.d/: e.g. my_file.sh
  2. In my_file.sh write the following:

    TST=$(pgrep udhcpd) 
    echo "So udhcpd has the following PIDs" 
    echo $TST 
    # put one PID in each element of the array, i.e split on the spaces 
    for i in "${arr[@]}" 
        echo "We are now going to execute kill -9 $i" 
        sudo kill -9 $i 
    echo "Done."
  3. Make the file executable: chmod +x /etc/profile.d/my_file.sh

  4. Shutdown, power on and next time you login this script (asking you for root password) should be executed.
  5. After logging in, execute:

    pgrep udhcpd

    just to make sure that all of the instances have been killed.

  • just set option DHCPD_ENABLED="no" in /etc/default/udhcpd – imbearr Mar 15 at 7:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.