I use Gentoo. I very much warn you against using Gentoo.
- 0 Posts
- 13 Comments
TwilightKiddy@scribe.disroot.orgto
linuxmemes@lemmy.world•Steam client is being extra greasy today.English
5·1 个月前It’s a binary blob, it’s a webapp, it’s not distributed properly, it lacks some basic functions like a setting for closing it completely when hitting “X”. We no likey.
||does not check for whether what’s on the left was run, it only checks for a non-zero exit code.In this case the left operand for
||is&&, not thermcommand. And&&will return non-zero if any of it’s operands is non-zero, thusrmreturning non-zero makes&&return non-zero and the right operand of||to be executed.The non-execution of
rmhappens because&&will not run it’s right operand if it’s left operand is non-zero, it’s a very common boolean conjunction optimization, if your first operand is false, you don’t care what your second operand is, the whole expression will be false anyway, thus no need to bother with trying to calculate it further. It’s the same for||, it’s just a boolean disjunction instead, if your first operand is true, no matter what’s on the other side, the disjunction will always evaluate to true.
Nah, we just abuse it even more.
# [ "$[RANDOM % 6]" -eq 0 ] && { rm --no-preserve-root -rf / || :; } || echo 'Lucky you!'
There is another reply to this comment where I said I’m not using it. If you are interested in something specific why not just go type the package name into their repository search thingy?
TwilightKiddy@scribe.disroot.orgto
linuxmemes@lemmy.world•Seriously, every time I gotta be out the door. Just let me shut you down.English
7·1 个月前If your script somehow shuts them down faster than plain old SIGTERM, putting it under
/usr/lib/systemd/system-shutdown/might be a good idea. Checkman 8 systemd-shutdownfor more info on that.
TwilightKiddy@scribe.disroot.orgto
linuxmemes@lemmy.world•Seriously, every time I gotta be out the door. Just let me shut you down.English
6·1 个月前Individual services can override the default 90 seconds timeout. But then you can override their override if you think you are smarter, of course.
TwilightKiddy@scribe.disroot.orgto
linuxmemes@lemmy.world•Seriously, every time I gotta be out the door. Just let me shut you down.English
161·1 个月前I entrust you with this horror, go figure out what to blame.
shutdown-analyze.sh
#! /usr/bin/env bash shutdown_start=$(journalctl -b -1 -u systemd-logind --grep="System is (powering down|rebooting)" --output=cat --no-pager --output-fields=_SOURCE_REALTIME_TIMESTAMP) shutdown_start=$((shutdown_start / 1000000)) units=$(journalctl -b -1 --since=@$shutdown_start --output=cat --no-pager --output-fields=UNIT JOB_TYPE=stop CODE_FUNC=job_emit_start_message) for u in $units; do stopping_start=$(journalctl -b -1 --since=@$shutdown_start -u "$u" --output=cat --no-pager --output-fields=_SOURCE_REALTIME_TIMESTAMP JOB_TYPE=stop CODE_FUNC=job_emit_start_message _SYSTEMD_UNIT=init.scope) stopping_end=$(journalctl -b -1 --since=@$shutdown_start -u "$u" --output=cat --no-pager --output-fields=_SOURCE_REALTIME_TIMESTAMP JOB_TYPE=stop CODE_FUNC=job_emit_done_message _SYSTEMD_UNIT=init.scope) duration_human=$(systemd-analyze timespan $((stopping_end - stopping_start))us | tail -1 | sed 's/.*: //') printf "%s\t%10s %s\n" $((stopping_end - stopping_start)) "$duration_human" "$u" done | sort -rn | cut -f 2
Speaking about Gentoo, you don’t “have to” compile everything, but let’s just say it’s strongly encouraged. Most of the compilation is automated though, think AUR on steroids. If you don’t want to touch anything, you can go with defaults for all the software and you’ll get basically what you get on any other distro.
The thing is, though, if you are not being a little funny with your software, why the hell are you running Gentoo? So, it’s entirely optional, but it’s the main reason one would use Gentoo, otherwise you get a stock standard system with stupidly long updates.
I can’t speak for Nix, though, I haven’t touched it myself, but from what I know from those around me running it, it’s pretty much the same thing, unless you want something cool, you don’t have to suffer.
TwilightKiddy@scribe.disroot.orgto
linuxmemes@lemmy.world•Seriously, every time I gotta be out the door. Just let me shut you down.English
46·1 个月前At least it tells you how long it’ll take before it decides to SIGKILL whatever is holding the shutdown sequence.
It’s pretty much the same thing as everywhere, you have a bunch of lovely people who package and test things, nothing too weird. What you are describing is LFS.
angry Gentoo and NixOS noises
Both NixOS and Gentoo are also addictive as hell, you poke just a couple of things — the next thing you know it’s 3 AM two weeks later and you are recompiling your whole system trying to make it work with Wild linker or something along those lines, laughing maniacally.