News for hackers. Stuff that matters.

gotar

Re:Systemd, 10 years later (2020) on Sunday January 16, 2022 @03:56PM (#29959937)
You've probably looked at wrong repo. Any example of ugly code?
Re:Systemd, 10 years later (2020) on Sunday January 16, 2022 @03:53PM (#29959908)
On the contrary - everything in systemd is much easier than before.

Consider a situation, where your sh-backed SysV init was missing some function you required. Something between start-stop-daemon() or ifup(). You could throw a bunch of shell commands (note: most shell "programmers" are not capable of doing it properly; they do some '==' comparisons in /bin/sh shebang, don't handle errors, ignore fact that variables might contain "funny" characters etc. - but in general most of the scripts I've seen during my 24 years in Linux was simply badly written, meaning at least using bashizms). And then ...you watch out for every single package update that would overwrite your changes. Or you could polish them and try to push upstream.

Now the situation seems to be worse - you can't just edit some random file to add missing function, you need to write it in source C files and recompile. Not a way for quick and dirty solution.

But instead, you can simply write the same (s)hell commands in a script and call it from appropriate unit. No messing with thousand-lines scripts, no risk of overwrites, no need for upstreaming.

Re:Systemd, 10 years later (2020) on Sunday January 16, 2022 @03:41PM (#29959767)
> How do I list what's running?

systemd-cgls

> How do I list units

systemctl list-units

Simply use tab completion (like in zsh). And do not dare to compare UX-nightmare from git with systemd...

Re:Practical Vim Released by creator of vimcasts.org on Wednesday April 18, 2012 @06:30AM (#3857283)
At last