rc-status seg faults if you ln -s ../default /etc/runlevels/default/ user error of course, but should handle it more gracefully I think :) if you reboot while this is like this, it just hangs instead of shutting down, and if you hard reset it, it will boot up, but not all services start. In my case, the network and sshd were not up. and some background... I was not doing something so simple and obvious, but I was manually reorganizing my runlevels, and I accidentally had something equivalent but not as obvious. It was very easy to notice when looking for it, but not as obvious when I created it. :) Reproducible: Always Steps to Reproduce: 1. sudo ln -s ../default /etc/runlevels/default/ 2. rc-status 3. Actual Results: displays partial result and seg faults: $ rc-status Runlevel: default netmount [ started ] local [ started ] Segmentation fault $ Expected Results: display what it can, and just ignore and complain about a nonsense stacked runlevel. and on boot, you'd hope it just skips the problem services/stacked runlevel and continues. it should probably detect infinite recursion; probably either: - keep track of which runlevels were used, and don't rerun them - a crude stack overflow sort of error, just countin how many levels deep we are, and on overflow, skip a portion of it (last link only?) and continue with the next.
The segfault is triggered due to running out of stack in an infinite recursion. I've fixed this in a somewhat rudimentary way here: https://github.com/OpenRC/openrc/pull/109 Feel free to test it with various nasty stacked runlevel loops. rc-status will bail out, printing the details of the loop.
https://github.com/openrc/openrc/commit/45aa36c This will be included in OpenRC 0.23.