SYSV-RC-CONF(8)

๐Ÿ“ฆ version 0.99, in debian bookworm, debian trixie

๐Ÿ’– SYSV-RC-CONF ๐Ÿ’–

okay bestie, welcome to sysv-rc-conf (section 8 of the manual, she's a big girl now) โ€” the run-level configuration tool for SysV-like init script links โœจ


๐ŸŒธ NAME ๐ŸŒธ

sysv-rc-conf โ€” run-level configuration for SysV like init script links ๐Ÿ’…


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

sysv-rc-conf [ options ]

sysv-rc-conf --list [ service ]

sysv-rc-conf [ --level levels ] service <on|off>

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so basically sysv-rc-conf gives you an easy to use interface for managing /etc/rc{runlevel}.d/ symlinks. and the interface comes in two different flavors: one that just lets you turn services on or off (simple queen behavior), and another that lets you do more fine tuned management of the symlinks (main character control freak behavior). she's a replacement for programs like ntsysv(8) or rcconf(8), no cap ๐Ÿ”ฅ

and guess what โ€” sysv-rc-conf can also be used at the command line when you already know what changes you want to make to the symlinks. the syntax is borrowed from chkconfig(8), although it does not follow it exactly. iykyk ๐Ÿ’€


โœจ GENERAL OPTIONS โœจ

  • -c DIRECTORY, --cache=DIRECTORY โ€” the directory where the priority numbers, old runlevel configuration, etc. should be stored. this defaults to /var/lib/sysv-rc-conf. peep the FILES section down below and also the --Purge option ๐Ÿ’–
  • -r DIRECTORY, --root=DIRECTORY โ€” the root directory to use. defaults to /. this comes in handy if the root file system is mounted somewhere else, like when you're using a rescue disk ๐Ÿ†˜
  • -P, --Purge โ€” purge the information stored in the cache file. see the FILES section below and the --cache option ๐Ÿงน
  • -v FILE, --verbose=FILE โ€” print verbose information to FILE ๐Ÿ“
  • -V, --Version โ€” print version information to STDOUT and exit, periodt ๐Ÿ‘‘

  • -o [ see description ], --order=[ see description ] โ€” allows various sorting orders and ways to display the rows. the argument can be made up of any of the following:
    • a โ€” sort the rows alphabetically. this is the default if the -o option isn't specified.
    • n โ€” show the priority numbers along with the name of the service.
    • p โ€” sorts by the priority numbers.
    • level โ€” level can be any runlevel, 0-9 or S. this controls which runlevel the priority numbers are sorted at. it only makes sense to use this in conjuntion with p. if omitted, the priority numbers are sorted by the current runlevel the system is in. (yes the original says "conjuntion", she's quirky like that ๐Ÿ’…)
  • -p, --priority โ€” alternate layout. instead of just showing a checkbox, the priority of the service and the S or K are allowed to be edited. this is for more fine tuned control than the default layout allows ๐ŸŽ›๏ธ
  • -s levels, --show=levels โ€” which runlevels to show. this defaults to up to 8 of the runlevels available on the system. usually this means it will show 1, 2, 3, 4, 5, 0, 6, and S. the syntax calls for the runlevels to be allruntogether. for instance, to show runlevels 3, 4, and 5 the syntax would be --show=345. also see --order ๐Ÿ‘€

  • --level levels โ€” the runlevels this operation will affect. levels can be any number from 0-9 or S. for example, --level 135 will affect runlevels 1, 3, and 5. if --level is not set, the default is to affect runlevels 2, 3, 4, and 5. this option is only used for the command line interface โ€” see the section below labled USING THE CLI for more information. (again, "labled" is what she says, i'm just the messenger ๐Ÿ™ˆ)
  • --list [name] โ€” this option will list all of the services and if they are stopped or started when entering each runlevel. if name is specified, only the information for that service is displayed ๐Ÿ“‹

๐Ÿงš USING THE GUI ๐Ÿงš

๐Ÿ“Œ Note ๐Ÿ“Œ

when using either GUI layout described below, all configuration changes to the symlinks will happen immediately, not when the program exits. like she does NOT wait, she's impatient, she's a baddie ๐Ÿ˜ญ

๐Ÿ–ฅ๏ธ Using the Default layout ๐Ÿ–ฅ๏ธ

the default (simple) layout shows in a grid fashion all of the services that are in init.d and which runlevels they are turned on at. for example, where the ssh row and 3 column intersect, if there is an 'X' in the box there, that means the ssh service will be turned on when entering runlevel 3. if there is no checkbox it can mean that either there are no links to the service in that specific runlevel, or that the service is turned off when entering that runlevel. if more configuration detail is needed, see the next paragraph and the --priority option ๐Ÿ’–

๐ŸŽš๏ธ Using the Priority layout ๐ŸŽš๏ธ

the priority (advanced) layout also uses a grid fashion, but instead of checkboxes there are text boxes that can have a few different values. if the text box is blank, that means there isn't a symlink in that runlevel for that service. this means that when changing into that runlevel the service will not be started or stopped โ€” which is significant, bestie, don't sleep on it. if the text box starts with the letter K that means that the service will be stopped when entering that runlevel. if the text box starts with the letter S that means the service will be started when entering that runlevel. the two digits following is the order in which the services are started. that means that S08iptables would start before S20ssh. for more information see your system documentation ๐Ÿ“š

๐ŸŽฎ Controls ๐ŸŽฎ

to move around use the arrow keys, or if the terminal support it, the mouse ๐Ÿญ. typically there is more then one page of services (unless the terminal screen is large), to move between the pages use CTRL-n or CTRL-p, or simply arrow key down or up at the bottom or top of the screen, respectively. the bottom of the screen also shows these movement commands for quick reference. to restore the symlinks back to their original state before the sysv-rc-conf was run, press the r key. the h key will display a quick reference help screen ๐Ÿ†˜

โœ… Default layout โœ…

when using the default layout use the space bar to toggle the service on / off. an 'X' in the checkbox indicates that the service is on ๐Ÿ’…

๐Ÿ”ง Priority layout ๐Ÿ”ง

the priority layout uses the default movement keys. in order to edit the fields you can use CTRL-d to delete the character in front of the cursor or backspace to backspace. use CTRL-b or CTRL-f to move the cursor backwards or forwards within the field. note that only S, K, or any digit is allowed to be entered into the field ๐Ÿ‘‘

โ–ถ๏ธ Starting / Stopping Services โ—€๏ธ

to start a service now, press the "+" or "=" key. to stop a service now, press the "-" key.

this will call /etc/init.d/service start or /etc/init.d/service stop ๐Ÿš€


๐Ÿ’ป USING THE CLI ๐Ÿ’ป

if the desired modifications to the symlinks are known and only one quick change is needed, then you can use a CLI interface to sysv-rc-conf. examples:

# sysv-rc-conf --level 35 ssh off
# sysv-rc-conf atd on

the first example will turn ssh off on levels 3 and 5. the second example turns atd on for runlevels 2, 3, 4, and 5. slay ๐Ÿ”ฅ


๐Ÿ“ FILES ๐Ÿ“

note: feel free to skip this section ๐Ÿ˜Œ (she literally said that, i'm not being shady)

sysv-rc-conf stores a cache of all the symlink information from /etc/rc{runlevel}.d/ in /var/lib/sysv-rc-conf/services (see the --cache option to change the location of this file). it uses this cache to make an intelligent decision on what priority number to give the K or S link when they are changed in the simple layout. this cache is updated/created everytime the program is launched. the program needs to run with root privileges in order to update the cache. the format of the file is as follows:

RUNLEVEL S|K PRIORITY SERVICE

here's a few examples:

2 K 74 ntpd
2 K 50 xinetd
3 S 08 iptables
3 S 80 sendmail

sysv-rc-conf will first see if it can get an exact match from the cache. for example, if the symlink for cron in runlevel 3 is S89cron and you uncheck it, sysv-rc-conf will first see if there is an entry in the cache that looks like 3 K nn cron, if so it will use nn for the priority number.

if there wasn't a match, sysv-rc-conf will then see if there is another S or K (whichever you're switching to, so in this example, K) entry on a different runlevel โ€” so an entry like i K nn cron, where i is any runlevel. if found, the link will use nn.

if there still wasn't a match, sysv-rc-conf will look for the opposite of S or K in any run level, and use 100 - that priority. so in our example, i S nn cron. if nn is 20, then it will use 80 (100 - 20), since that is typically the way that the priority numbers are used.

if there still isn't a match, the default priority of 20 for S links is used, and the default priority of 80 for K links is used. periodt ๐Ÿ’…


๐Ÿค COMPATIBILITY ๐Ÿค

sysv-rc-conf should work on any Unix like system that manages services when changing runlevels by using symlinks in /etc/rc{runlevel}.d/. refer to your system documentation to see if that's the case (usually there's a /etc/init.d/README) ๐Ÿ“–


โš ๏ธ CAVEATS โš ๏ธ

sysv-rc-conf only manages the symlinks in the rc{runlevel}.d directories. it's possible that packages may have other ways of being disabled or enabled. so like, don't come for her if something else is doing its own thing ๐Ÿ˜ญ

because Curses takes over the screen sometimes error messages won't be seen on the terminal. if you run across any weird problems try redirecting STDERR to a file when you execute the program.

for example:

# sysv-rc-conf 2> err.out

๐Ÿ› REPORTING BUGS ๐Ÿ›

report bugs to Joe Oppegaard <joe@pidone.org> ๐Ÿ“ฌ


๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

init(8), runlevel(8), chkconfig(8), /etc/init.d/README

www: http://sysv-rc-conf.sourceforge.net
ftp: ftp://ftp.pidone.org/sysv-rc-conf

๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Joe Oppegaard <joe@pidone.org> ๐Ÿ’–


and that's the whole page bestie!! she's from perl v5.32.1, dated 2021-10-31, and she lives in section 8 of the manual (SYSV-RC-CONF(8) both as her title and her footer, iconic of her tbh). go forth and manage those symlinks responsibly, mwah ๐Ÿ’…โœจ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from