Ubuntu 1804 install failure - fixed
Posted: Mon Apr 06, 2020 6:42 pm
Downloaded the 7.5.1 packages and I get the install on the fahclient complaining on Ubuntu 1804 LTS I'm running: -
update-rc.d: error: cannot find a LSB script for FAHClient
...apparently the .deb installer doesn't do SystemD; not that I blame it, my personal preference is still init.
SystemD detection is relatively trivial:
Snatched a copy of the service script someone posted here: -
Overview: -
Can post the diffs or throw it in git if it's useful to anyone.
update-rc.d: error: cannot find a LSB script for FAHClient
...apparently the .deb installer doesn't do SystemD; not that I blame it, my personal preference is still init.
SystemD detection is relatively trivial:
Code: Select all
freedesktop.org/software/systemd/man/sd_booted.html
Code: Select all
gist.github.com/lopezpdvn/81c8bb867c51292045c6#file-fahclient-service
- Extracted the .deb manually
Added the fahclient.service as a source file in the data archive as ./usr/share/doc/fahclient/fahclient.service.example.systemd - probably fair to have attribution if used publicly.
Modified "preinst" to detect SystemD and run appropriate service stop if update (runs under dash shell on Ubuntu 1804)
Modified "postinst" to detect SystemD, and copy the example script above, then install/enable if that option is selected
Modified "postrm" to detect SystemD, stop/disable the service, and remove the script (runs under dash shell on Ubuntu 1804)
Added the updated scripts back into the control archive.
Copied the .deb and used ar r to replace the updated archives in the new .deb
Can post the diffs or throw it in git if it's useful to anyone.