from Hacker News

“Support for System V scripts now deprecated; will be removed in future release”

by sweettea on 6/28/23, 11:02 PM with 141 comments

  • by atomicnumber3 on 6/28/23, 11:31 PM

    I continue to be baffled by people objecting to systemd. I know some people just don't like it and that's fine, people make alternative distros without it. You're not alone.

    But I just have to ask, even if it sounds condescending (I'm sorry- but I really am just honestly baffled-) has anyone who complains about systemd actually written a unit file vs an init script?

    I have used init scripts, I have written init scripts. I hated it. Every program needed it's own little way of doing things and writing an init script for a daemon was a hassle of bash scripting and copy pasting.

    Now you can get so much functionality out of literally just an ExecStart with a few lines of boilerplate. It's beautiful. And all your logs are in journald, which for me get scraped by a single promtail config into Loki. And systemd's structured logging means I get a lot of metadata available by default for filtering and tagging.

    It's just swell. And it's free software!

  • by Arnavion on 6/28/23, 11:17 PM

    It's just as well. There isn't any software on my OpenSUSE Tumbleweed (rolling distro) machines that still only has sysv scripts. My Debian 11 router had some (nginx IIRC) but those went away when I updated it to Debian 12.

    The more impactful change to me is the one mentioned a few lines down, about `systemctl --user` getting `CAP_WAKE_ALARM` so that user-privilege programs can set timers to wake up from suspend. As it mentions, GNOME Clocks has wanted to use systemd timers for a long time, and it's the de facto alarm program for Linux phones running GNOME / Phosh. https://gitlab.gnome.org/GNOME/gnome-clocks/-/merge_requests...

  • by shrubble on 6/28/23, 11:15 PM

    Not made by Microsoft, but 'embrace, extend, extinguish' which is a strategy of these folks I saw coming years ago, will no doubt surprise many...
  • by aftbit on 6/28/23, 11:15 PM

    Also they are ending support for unmerged-usr (/usr/bin and /bin as different directories). On one hand, here's Redhat (and Pottering) using their position as dominate service manager to bully distros and software into adopting their views of the world. On the other hand, systemd has been a great step away from fragmentation in distro-land.
  • by nubinetwork on 6/28/23, 11:14 PM

    That's a bold strategy cotton, let's see how it plays out for them. ;-)

    But seriously, I expect to see a lot of software lose the ability to be run on systemd because they don't ship a service file.

  • by andrewstuart on 6/28/23, 11:20 PM

    Lennart Poettering is now working for Microsoft.

    is he still working on systemd?

  • by nazgulsenpai on 6/28/23, 11:40 PM

    Two things that are sure to set fire to the comment section: a negative article about Apple, and any article about systemd.

    Good luck out there, friends.

  • by dsr_ on 6/28/23, 11:28 PM

    $ ls -al /sbin/init

    -rwxr-xr-x 1 root root 52400 Apr 3 02:25 /sbin/init

    $ cat /etc/debian_version

    12.0

    running:

    postgresql, postfix, dovecot, clamav, nginx, chrony, clamav, isc-dhcpd, bind...

  • by rektide on 6/29/23, 5:46 AM

    This is an amazing release. As far as controversy clickbait topics go, personally I'm much sadder to see umerged-usr bite the dust, even though i'm a huge fan of merged-usr, just because it was super nice being able to boot off whatever / you have and drop another systems' /usr in. But at least there's systemd-sysext to allow some combining overlays. Anyhow, excited to talk through various changes that look exceptionally neat to me:

    RootEphemeral=, which lets processes run in a filesystem snapshot; super neat for seeing what changes a process might make to your system. https://github.com/binpash/try was a popular submission a couple days ago, & this builds in a similar capability to the os.

    RestartSteps= and RestartMaxDelaySec= to finally finally offer some level of control over exponential-backoff in the restart behavior.

    FileDescriptorStorePreserve= is kind of mysterious, lets systemd store open file descriptors for a process even after it terminates. Some interaction with systemd-analyze. Not sure what this is for exactly but definitely cool extra visibility/observability of processes. I tend to think it also potentially could be useful allow for some weird/fun stuff like restarting services without closing ports.

    Soft-reboot which can be useful for switching roots without having to juggle bootloading. Very useful for anyone doing partitioning or what-not. And as I hinted above, you can pass file-descriptors, meaning you can avoid service-interruption while rebooting; what a neat trick.

    DelegateSubgroup= puts processes inside a sub-cgroup inside the top level cgroup. So as a user you could have a bunch of sub-cgroups that you can manage, letting you juggle/manage resources within your cgroup. This sounds a lot like Dixon's incredible talk technique of cgroup management, Linux memory management at scale. https://www.youtube.com/watch?v=beefUhRH5lU&t=2241s This is also easily what I think the worst most pitiful saddest part of the Kubernetes story is: a complete unwillingness to let Linux manage memory & use cgroups well, in favor of it's own scheduler which makes all the decisions.

    iocost calculations for io devices, to configure/tune io/qos cost for devices. has a huge existing db of drives. https://github.com/iocost-benchmark/iocost-benchmarks

    systemd-sysext gains a systemd-confext twin. the former manages overlays for /usr and /opt, the latter manages overlays for /etc. Very nice portable services tool now. Maybe the capstone work completing Revisiting how we put together Linux Systems. https://0pointer.net/blog/revisiting-how-we-put-together-lin... .

    Using efi vars to save the hibernation partition, which should be a huge win for hibernation working everywhere.

    Some other neat bits:

    CAP_WAKE_ALARM rights to user sessions, for setting long-running timers. Sigqueue support to send processes signals with associate values. list-paths verb to show paths. systemd.tty.* kernel arguments for setting up ttys. Early load virtio_console module if it detects it's runnin in a VM to get console up earlier. Upholds= gets a new .upholds/ drop-in directory for keeping other services running (not just starting them like Wants=). sd_journal_get_seqnum api call so apps can have mechanistic sympathy with journald. Ton of bootloader, boot-security, repartitioning, disk-encryption enhancements across the map. SetTTY to for updating the TTY of a session; so useful for ssh'ing in.

    udev creates /dev/loop/by-ref/* files with helpful names. systemd-resolved gets a StateRetentionSec= to let you cache & use old records if a nameserver isn't responding. Most systemd services now have some standard signals they accept to tweak config, ex: changing log level, log target, trim memory, print debug mem info. machinectl & networkctl gain "edit" and "cat" capabilities for viewing config. systemd-firstboot --reset which is hella useful for cloning machines & updating machine-id. Services now sd_notify with their EXIT_STATUS on exit; part of trend of making services more observable/operable everywhere. new systemd.mount-extra= kernel arg to ask for mounts at startup.

    I love reading release notes in general, but this was absurdly delightful. It felt like in the past sometimes systemd was focusing on new feature growth & ideas, but I'm seeing huge maturation & growing in in this release. Really leaning hard into everything alive & responsive on via signals and passing around file-descriptors is excellent excellent excellent systems-wonkery. The fit and finish here is going way up. There's just a ton of damned-useful ergonomic wins that make everything super easy to find & see & touch & manage. 254 is an epic release.