0

I need to disable dnsmasq from starting during boot.
So far I've tried

sudo systemctl disable dnsmasq.service
sudo update-rc.d -f dnsmasq remove
ENABLED=0 in /etc/default/dnsmasq

None of these work. During boot cycle it hits Reached target Sound Card. and after that it tries to start dnsmasq.service

grep -nrI Default-Start /etc/init.d contains:
/etc/init.d/dnsmasq:6:# Default-Start: 2 3 4 5

systemctl list-unit-files | grep enabled dnsmasq not present

0

Raspbian comes with systemd, the new init bootup system and replaces old style SysV init. For compatibility reasons and for old software not knowing about systemd, the SysV init is genereated by systemd. man systemd-sysv-generator says:

systemd-sysv-generator is a generator that creates wrapper .service units for SysV init[1] scripts in /etc/init.d/* at boot and when configuration of the system manager is reloaded. This will allow systemd(1) to support them similarly to native units.

What you have done was to mix up both systems so it is fairly possible that something is broken with your installation of dnsmasq.

For the future please only use systemctl and journalctl for managing services! There is no need to touch /etc/init.d/.

The simplest way to fix this is to flash the SD Card with a new image. If this isn't possible you can try to install dnsmasq again and purge it afterwards in the hope it will clean up your messed installation:

rpi3 ~$ sudo apt update
rpi3 ~$ sudo apt full-upgrade
rpi3 ~$ sudo apt install dnsmasq
rpi3 ~$ sudo apt --purge remove dnsmasq
rpi3 ~$ sudo apt autoremove
  • I've figured it out yesterday night. It was rc.local starting dnsmasq after all. Network boot priorities changed from Jessie to Stretch and wpa_cli commands just return empty strings if service is not ready yet. Hence my command executing too early. I'll mark your answer as solution to close the question. – goodevil Apr 6 '18 at 13:55

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.