Fix listing of services

This commit is contained in:
Alex D. 2023-10-06 17:57:18 +00:00
parent fbd840ff8c
commit 18a0fa1f01
Signed by: caskd
GPG Key ID: F92BA85F61F4C173
1 changed files with 16 additions and 8 deletions

View File

@ -1,12 +1,20 @@
set -ex
(
echo 'digraph G {'
echo 'graph [layout=dot rankdir=LR]'
(
for i in $(s6-rc-db dependencies default); do
for j in $(s6-rc-db dependencies $i); do
printf '"%s" -> "%s"\n' "$j" "$i"
done
done
) | sort | uniq
echo 'edge[tailport=e]'
echo 'graph [layout=dot rankdir=LR splines=false ranksep=1]'
for i in $(s6-rc-db list all); do
if [ "$(s6-rc-db type $i)" = "bundle" ]; then
for j in $(s6-rc-db contents $i); do
printf '"%s" -> "%s"\n' "$j" "$i"
done
else
for j in $(s6-rc-db dependencies $i); do
printf '"%s" -> "%s"\n' "$j" "$i"
done
fi
done | sort | uniq
echo '}'
) | grep -v 's6rc' > boot.gv