• Bug#1066911: ppp: please provide a systemd ppp@.service

    From Helmut Grohne@21:1/5 to All on Fri Mar 15 12:10:02 2024
    Package: ppp
    Version: 2.4.9-1+1
    Severity: wishlist

    Hi Chris,

    is there a reason that ppp does not come with a systemd unit? I guess
    the most common way to integrate ppp is via ifupdown type ppp, but
    things are moving into other tools such as systemd-networkd and
    netplan.io. It seems like systemd doesn't particularly like ppp https://github.com/systemd/systemd/issues/481, so it is unlikely to gain
    native support. Effectively, what ifupdown does is run pppd with the
    right arguments. This can be easily implemented as a .service unit.

    An easy way is copying the Arch file: https://gitlab.archlinux.org/archlinux/packaging/packages/ppp/-/blob/main/ppp.systemd

    I note that pppd already supports integration into systemd and thus
    becomes a Type=notify service when also passing up_sdnotify. nolog is
    redundant as it is implied by up_sdnotify. The file should be installed
    as /usr/lib/systemd/system/ppp@.service and not enabled:

    dh_installsystemd --no-enable --no-start --no-restart-on-upgrade

    People have also been looking into hardening and a lot can be turned on,
    but since pppd may invoke external scripts I'm not sure this is
    generally appropriate: https://gist.github.com/rany2/330c8fe202b318cacdcb54830c20f98c

    People using this unit probably want to add customization for dependent interfaces if using PPPoE:

    # /etc/systemd/system/ppp@$PROVIDER.service.d/ifacedep.conf
    [Unit]
    BindsTo=sys-subsystem-net-devices-$IFACE.device After=sys-subsystem-net-devices-$IFACE.device

    Still having the template unit in the ppp package would be useful, do
    you agree?

    Helmut

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)