Skip to content

Conversation

@navi-desu
Copy link
Member

Every caller of the function already gets a list of services from a valid librc api, and does filtering themselves.

The rc_service_in_runlevel specially is quite clear to me that it doesn't really matter.

The deptree check seems useless, it just checks if it's on the deptree and filters the service if not, but callers already get those service lists from proper functions. If anyone sees the use for the deptree check, do tell

@navi-desu
Copy link
Member Author

okay i found one issue with this patch, stacked runlevels are shown when they shouldn't

although i think i can fix it without all that complexity

@navi-desu navi-desu marked this pull request as draft September 25, 2024 00:03
@navi-desu navi-desu self-assigned this Sep 25, 2024
@navi-desu navi-desu marked this pull request as ready for review September 25, 2024 00:24
@navi-desu
Copy link
Member Author

ls_dir is erroneusly including directories when LS_INITD is set, which makes rc_services_in_runlevel return stacked runlevels as well. this bug was hidden in rc-status due to the unnecessary double check on every printed service.

Every caller of the function already gets a list of services from a
valid librc api, and does filtering themselves.
ls_dir is used to list services in a runlevel, in which directories are
stacked runlevels, not init scripts. And in general, folders are not
allowed in init.d dirs anyway.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants