Woersty / LoxBerry-Plugin-DNSmasq

A LoxBerry Plugin
http://plugins.loxberry.de
Apache License 2.0
3 stars 3 forks source link

Bug beim Upgrade auf Debian Bullseye #10

Open mschlenstedt opened 1 year ago

mschlenstedt commented 1 year ago

Das Plugin modifiziert im Daemon-Skript die Datei /etc/init.d/dnsmasq.

Beim Upgrade auf Debian Bullseye wird die neue /etc/init.d/dnsmasq, die mit Bullseye ausgeliefert wird, daher nicht installiert bzw. nach /etc/init.de/dnsmaq.dpkg-dist installiert. Das alte Initskript aus Buster läuft aber nicht mehr unter Bullseye, daher wird dnsmasq nicht gestartet.

Lösung: Im Daemon-Skript auf /etc/init.de/dnsmaq.dpkg-dist prüfen und die Datei installieren und erneut modifizieren.

Loxberry1 commented 1 year ago

Sorry aber hab keinen Plan. Kannst Du mir dies bitte kurz erklären. Gibt es schon eine Lösung?

gmkey commented 1 year ago

in English (my German would be English with a German accent).

As far as I can see, the upgrade mechanism of Debian installs the newer version alongside the original dnsmasq file in /etc/init.d However the original version will not work due to the version differences with the upgrade to bullseye. So the recommended solution would be to check for:

  1. a debian upgrade 2.. a /etc/init.d/dnsmasq.dpkg-dist and a /etc/init.d/dnsmasq
  2. move /etc/init.d/dnsmasq to /etc/init.d/dnsmasq.old
  3. copy /etc/init.d/dnsmasq.conf.dpkg-dist to etc/init.d/dnsmasq
  4. make the changes as part of the scripts you already have.

I could have a try, but I'm extremely busy so that will not happen before september. PS - I do have to admit that I'm not an experienced Debian packager, so I would recommend checking this approach with the community.

pvergauwen commented 1 year ago

I use the O.S. built-in DNSMASQ on loxberry for the Weather4Loxone plugin, so not the plug-in. After the upgrade to loxberry 3.0.0.6 (and consequently Debian Bullseye), DNSMASQ stopped working as mentioned in the loxberry release notes. I noticed the DNSMASQ service was terminating with error code 3. After some trial and error I discovered that the /etc/systemd/system/dnsmasq.service config file was using an obsolete command: /etc/init.d/dnsmasq checkconfig. So I made following change to the dnsmasq.service config file (logged in as root with ssh terminal):

ExecStartPre=/etc/init.d/dnsmasq checkconfig (<- comment out original command)

ExecStartPre=dnsmasq --test (<- replace with this --test command)

After restarting the service and reloading the deamons: systemctl restart dnsmasq systemctl daemon-reload

The DNSMASQ service now runs without errors. Note: I did not test all functionalities of DNSMASQ, but the redirect for weather.loxone.com for the weather4loxone plug-in now works correctly.

Woersty commented 1 year ago

Will have a look as soon as I find some time. Maybe I can release a fix version for LB3

mschlenstedt commented 1 year ago

The plugin changes the Service File with an obsolete command. This is why the service file does not work in LB anymore.

The plugin should check for a new Service File and then install it and redo the needed changes. As described in the first post of this thread.

Woersty commented 1 year ago

Ich kanns gerade nicht testen aber habe mal was programmiert. Ich setz mal ein 2er mit dnsmasq auf und lasse ihn auf 3 updaten.

Woersty commented 1 year ago

geht nich