Post by @mcc@mastodon.social

mcc
@mcc @mastodon.social

A year ago learning systemd would be a "well, it's like any system, it's got upsides and downsides" but now, now that I'm in "move to NetBSD or some other non-AI-generated operating system ASAP" mode, having to learn systemd is grating. Did you know systemctl does not respect the conventional PAGER environment variable? It wants you to use the very special SYSTEMD_LESS variable

Replying to @mcc@mastodon.social

@mcc

yes. and also before it fucks you like it fucked me, take a very careful look at how it assigns network adapter names and what it demands of you to keep them something sane on -your- distro.

✧✦Catherine✦✧
@whitequark @treehouse.systems

@munin @mcc at least it now provides aliases, i guess

Replying to @mcc@mastodon.social
Fiona
@airtower @woem.men

@mcc@mastodon.social It's a little more complicated, there's SYSTEMD_PAGER to set the pager, and if less is used (which is the default, or part of it), SYSTEMD_LESS lets you set options for less. Whether the difference matters depends on what you're trying to do. ​:neocat_laugh_sweat:​

Replying to @airtower@woem.men
mcc
@mcc @mastodon.social

@airtower i was trying to turn the pager off lol

i guess there's a --no-pager. But now i can't figure out how to get it to still emit color when i'm piping it into a pager manually D:

Replying to @mcc@mastodon.social
mcc
@mcc @mastodon.social

@airtower i'm sure i'll figure that out too eventually

Replying to @mcc@mastodon.social
Fiona
@airtower @woem.men

@mcc@mastodon.social export SYSTEMD_PAGER= does the same. I've been doing that way too much lately because Busybox's less doesn't play nice with serial console.

Replying to @mcc@mastodon.social
cliffle
@cliffle @hachyderm.io

@mcc so, while it may not make it less grating, there is actually a reason for that.

SYSTEMD_LESS isn't a replacement for PAGER,. it's a replacement for LESS -- the environment variable that less interprets for its default options. My understanding SYSTEMD_LESS is only useful for altering the options given to less, _not_ replacing the pager program.

You probably _could_ work out a way to replace the pager, but iirc journalctl and friends pass options to it assuming it has less-compatible command line syntax. So you'd want to check for that.

Replying to @cliffle@hachyderm.io
cliffle
@cliffle @hachyderm.io

@mcc ...hm, it actually looks like journalctl and friends respect PAGER unless that's overridden -- do you have SYSTEMD_PAGERSECURE exported? That overrides PAGER.

(Also if you're just venting and don't want to override the pager on the systemd system you're having to use, I can shut up.)

Replying to @mcc@mastodon.social
Briala
@static @aus.social

@mcc I got the ick when I saw they had to put a README file in /var/log because there's a thing called journalctl now.

Replying to @static@aus.social
horse oil
@gutmunchies @chitter.xyz

@static @mcc yeah... like i get that a searchable log database is cool and modern and technological and shit but (incoherent screaming and throwing computer parts at the wall)

Briala
@static @aus.social

@gutmunchies @mcc It also doesn't address how shit so many devs are at logging.

Replying to @mcc@mastodon.social

@mcc@mastodon.social Oh yeah it violates VERY long standing UNIX contracts left, right and center. A good friend of mine whose day job involves maintaining this Antediluvian Linux appliance spent MONTHS wrestling with our boy Leonard on the systemd mailing lists, and everyone involved made it clear that they see this as a feature.

I have no beef with systemd honestly, but some of it, like what you just cited, feels pointlessly trivial. Like, how much extra effort if ANY would it have taken to support PAGER?

But it's Leonard's way or the highway. If that stuff grates on you, I'd definitely consider other paths. I'm a platform engineer/SRE at work and so keeping up to date with $LINUX.STANDARD kinda isn't optional for me, but if you have the room to explore go for it! Have some fun while you're at it and check out all the options.

Replying to @mcc@mastodon.social
margot
@emaytch @mastodon.social

@mcc i wish it would SYSTEMD_LESS

Replying to @mcc@mastodon.social
William D. Jones
@cr1901 @mastodon.social

@mcc I wonder why it doesn't fall back to the old var, analogous to how VISUAL will be checked if EDITOR is not set for many *nix tools.

Replying to @mcc@mastodon.social
V
@atonal440 @mastodon.social

@mcc for some reason I knew this! I did not seek out this information. I think there's some reminder that kept showing up as I was troubleshooting systemd stuff.