RobertCNelson / boot-scripts

Just a bunch of useful scripts placed under /opt/scripts/
125 stars 132 forks source link

autoconfigure_usb0.sh udhcpd detection fails when udhcpd uninstalled and replaced with dnsmasq #12

Open BrianAdams opened 9 years ago

BrianAdams commented 9 years ago

boot-scripts/boot/autoconfigure_usb0.sh

Not critical, but if someone were to do a typical apt-get uninstall udhpd, the system will keep the /etc/defaults/udhcpd folder around. Since that is what is used for detecting if udhcpd is installed, this script will then fail when it runs even when dnsmasq has been installed as a replacement.

Don't know if grep'ing the dpkg --list is too heavy, but it would serve as a more accurate detection method.

The current work around is to manually delete the /etc/defaults/udhcpd folder after uninstalling udhcpd.