Gentoo Archives: gentoo-user

From: Daniel Frey <djqfrey@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Is there a way to list orphaned services?
Date: Fri, 13 Dec 2019 00:52:34
Message-Id: 7f763cd7-d440-8814-9c7d-cc93fc423a3b@gmail.com
1 Subject kind of says it all...
2
3 I was reading manpages and I don't think there's a way, so I thought I'd
4 ask.
5
6 I've been merging/unmerging packages for testing and some have to be
7 started via a daemon, so I've had to add them to /etc/runlevels/* via
8 rc-update.
9
10 The problem is I was removing packages without doing `rc-update del
11 <service> <runlevel>`, leaving them added in the runlevel with no valid
12 script/symlink.
13
14 Now, I could just do `ls -al /etc/runlevels/*` and search manually for
15 broken symlinks and then manually remove them.
16
17 It seems that `rc-update -a` parses /etc/init.d/* and looks for matching
18 symlinks in /etc/runlevels, but not the other way around.
19
20 It looks like rc-update has a "-a" parameter that deals with broken
21 symlinks but it still requires a service name which is not listed any
22 more in /etc/init.d.
23
24 I did test this, `rc-update -v show` did not show NetworkManager (which
25 I'd removed. Manual inspection of /etc/runlevels showed a broken link. I
26 then ran `rc-update del NetworkManager default`, which worked even
27 though it isn't listed in the rc-update output.
28
29 Or am I overthinking things? Or maybe I'm just getting too tired to
30 think about this. :o)
31
32 Dan

Replies

Subject Author
Re: [gentoo-user] Is there a way to list orphaned services? Neil Bothwick <neil@××××××××××.uk>
Re: [gentoo-user] Is there a way to list orphaned services? Stefan Schmiedl <s@×××.de>