On 12/24/2014 09:09 AM, Sérgio Basto wrote:
lrwxrwxrwx 1 root root 36 Dez 24 15:07 default.target
Yeah, I get that this is the default target. What I want to know is,
what's the *current* target, i.e. what's the systemd way of querying
runlevel. I understand that the concept doesn't apply exactly in
systemd, so a better way to ask might be "of those targets which
correspond to runlevels, which is the highest one that's running?"
For example, normally "systemctl list-units --type=target" shows both
multi-user and graphical running, but after "systemctl isolate
multi-user.target", graphical is no longer listed (adding --all shows it
I suppose you could hack up a script based on the runlevel* symlinks in
/usr/lib/systemd/system, but surely there's a better way?
Glenn Holmer (Linux registered user #16682)
"After the vintage season came the aftermath -- and Cenbe."