On Sun, Dec 27, 2020 at 11:56:21PM +0000, Graham Seaman wrote: > I'm having problems with pppd and an intermittent phone line
Wow. Memories fading :-) OK, my recollection on inittab is a bit dusty, and I have little experience with systemd (trying to keep it that way). But I'll try a shot at it. The idea of inittab was to keep an eye on some processes: when they died, they were restarted ("respawn", in inittab parlance). This was init's job (thus inittab). Its main customers were the login processes. At their other end were serial lines attached to terminals (ah, vt220...). A user logged in at one of those things, the login handed off to a shell or something, when the user logged off the shell terminated, the calling login terminated and... respawn. Other things followed, typically daemons and... pppd. Then came SysV: daemons had to take care of themselves, PID files grew like mushrooms all over the place. It was bad times. The inittab was still there, mind you, but it was only tending to the Linux consoles (tradition perhaps :-) and to non-existing serial terminals. My system still has one, perhaps yours too. Now with systemd, we've turned full circle (unfortunately, with seventeen layers of complexity stacked in-between). In theory, systemd /should/ be able to do exactly what init used to do back then. Searching for "inittab systemd" via our favourite search engine (no, not that one with the big G) yields a couple of good hits. In [1] there's an example on how to translate an inittab entry into a systemd unit file.. In [2] you can see where the systemd unit files for your serial console live under Debian, perhaps there /is/ already something near that for pppd? Assuming you are on Buster... the list of files for package ppp (where pppd lives) is here [3]. No, no unit for respawn, alas. Only one to kick systemd's DNS service on connect and disconnect events (/lib/systemd/system/pppd-dns.service). Seems like you'll have to fashion one after some /lib/systemd/...tty.service. Perhaps there's someone around here who has done that to help you out. Tip: don't put it in /lib/systemd/... This place os for your distro. Put it somewhere in /etc/systemd/... that's for you, the admin. I can't provide details -- no experience with that. I'd try to file a bug against ppp: they should be providing a systemd unit file. Cheers - t [1] https://forums.opensuse.org/showthread.php/475468-In-search-for-a-inittab-entry-replacement-for-systemd#7 [2] https://wiki.debian.org/systemd#line-288 [3] https://packages.debian.org/buster/amd64/ppp/filelist
signature.asc
Description: Digital signature