[systemd-devel] hello (and, a documentation patch)

Matthew Miller mattdm at mattdm.org
Thu Sep 2 21:08:00 PDT 2010


On Fri, Sep 03, 2010 at 05:43:25AM +0200, Lennart Poettering wrote:
> Thanks! applied! (And already included in v9)

Awesome.

> > Is there an easy way to list all units where AllowIsolate is enabled? That
> > should be included alongside this, I think.
> 
> Hmm, no, I fear not.
> 
> This should be pretty accurate, but it is not particularly nice:
> 
> ( cd /lib/systemd/system/ ; fgrep -l AllowIsolate=yes *.target )
> 
> I need to think a little more about whether we can find a more
> accessible way to do this.

Maybe some way of using the systemctl --property flag to also apply to
list-units? 

This is, by the way, a good example of why making the output of all commands
be script-friendly is important. I can do this:

  for t in $( systemctl list-units --all -t target |awk '/[^ ]+\.target/ { print $1}' ); do systemctl -p AllowIsolate show $t|grep -q 'yes' && echo $t ; done

but that's way more awk than should be necessary. And as I understand it,
--all still won't list everything.




-- 
Matthew Miller           mattdm at mattdm.org          <http://mattdm.org/>


More information about the systemd-devel mailing list