Artix Linux Forum

Init systems => S6 => Topic started by: crinklywrappr on 01 July 2020, 02:54:46

Title: Some basic s6 questions
Post by: crinklywrappr on 01 July 2020, 02:54:46
How do I determine what bundles a given service is a part of?

Can I query a service *type* using one of the s6-rc-* apps?
Title: Re: Some basic s6 questions
Post by: Dudemanguy on 01 July 2020, 03:25:57
How do I determine what bundles a given service is a part of?

Sadly, I don't think there's a handy way to do that with s6-rc-db. You could list every bundle with s6-rc-db and then check the contents of each bundle. This sounds like something that's worth sending a patch to upstream s6-rc for if anyone gets motivated enough.

Quote
Can I query a service *type* using one of the s6-rc-* apps?

Yeah, you can just do s6-rc-db type service.
Title: Re: Some basic s6 questions
Post by: strajder on 11 August 2020, 20:21:01
How do I determine what bundles a given service is a part of?

Quote
$ service=hwclock; for bundle in $(s6-rc-db list bundles); do pkgs=$(s6-rc-db contents $bundle | grep -- $service); [ ! -z "$pkgs" ] && echo $bundle; done
misc
boot
Replace hwclock with the name of the service.