RCCONF(8)

πŸ“¦ version 3.2, in debian bookworm

πŸ’– RCCONF(8) πŸ’–

okay bestie, this is the Debian GNU/Linux manual page for rcconf β€” it lives in section 8, so it's a sysadmin-y one. buckle up πŸŽ€


✨ NAME ✨

rcconf β€” the Debian Runlevel configuration tool. that's literally its whole thing, no cap.


🌸 SYNOPSIS 🌸

rcconf [options]

πŸ¦‹ DESCRIPTION πŸ¦‹

So like… Rcconf lets you control which services get started when your system boots up or reboots. iconic behaviour tbh. it shows you a menu of every service that could be started at boot, the ones that are actually configured to do so are marked, and you can toggle individual services on and off like a little light switch πŸ’…

Rcconf gets its list of services from /etc/init.d and then peeks inside the /etc/rc?.d directories to figure out whether each service is on or off. it detects the ON state by the existence of /etc/rc?.d/"S"NNname. that's the vibe check right there.

If the number (NN of /etc/rc?.d/[SK]NNname) is not 20 (which is the default), rcconf saves the service name and the number in /var/lib/rcconf/services so it's able to restore the service to its original configuration later. it's giving organised. it's giving backup plan. 🫢

⚠️ okay important one: if you purge the rcconf package using dpkg --purge, or aptitude purge, or literally any of the others, you may lose the off state package because /var/lib/rcconf/services gets deleted. so like… be careful bestie, no cap 😭

πŸ’… OPTIONS πŸ’…

  • --help β€” prints out a usage message. the classic. the helpful one. we love her πŸŽ€
  • --dialog β€” uses the dialog command to display the menu.
  • --whiptail β€” uses the whiptail command to display the menu.
  • --notermcheck β€” do not set the window size by terminal property.
  • --on service[,service,...] β€” sets services to be on. this option enables rcconf in command line mode and no select menu will be displayed. just straight to business ✨
  • --off service[,service,...] β€” sets services to be off. this option also enables rcconf in command line mode and no select menu will be displayed.
  • --list β€” lists services, and it includes the current status (on/off). this option enables rcconf in command line mode and no select menu will be displayed. use the --expert option together with it if you want to list all services. also, this result can be used as the config_file of --config. obsessed with the reusability honestly πŸ”₯
  • --config config_file β€” sets services on/off according to config_file. this option enables rcconf in command line mode and no select menu will be displayed. the format of this config file is "service_name on" or "service_name off" in each line. go refer to the result of --list for reference.
  • --expert β€” shows and selects all services, for the experts. in default, rcconf doesn't display system default services as a candidate, things like mountall.sh, so it can hide unnecessary services from users (but they're very important for the system, lowkey πŸ‘€).

the list of which services are considered expert can be found at the line @expertonly in /usr/sbin/rcconf.

  • --now β€” for each service that had the links changed, it calls the corresponding /etc/init.d/service-name script using invoke-rc.d, so the package starts or stops immediately. if you do not use this option, the changes will only take effect the next time you reboot (or change runlevel). so yeah, no --now means the glow-up is delayed bestie πŸ™ˆ
  • --verbose β€” outputs verbose messages. she's chatty and we respect it πŸ’œ

πŸ“– Guide File πŸ“–

Rcconf can display some description (a Guide) for each service with a Guide File. the Guide File is placed on /var/lib/rcconf/guide, and this Guide File does not exist by default. so if you want to use Guide, you need to define guides for each service in this file. DIY energy ✨

if you run update-rcconf-guide before rcconf, then rcconf can use default guides derived from the package description. Update-rcconf-guide generates the file /var/lib/rcconf/guide.default from the package description (it only uses the first line of it) using apt-cache. Rcconf refers to Guides in /var/lib/rcconf/guide before /var/lib/rcconf/guide.default. priority order, periodt πŸ‘‘

if you install some packages after you've executed update-rcconf-guide, you need to re-create this file using update-rcconf-guide so as to refresh guide.default so it includes the new guides for the installed new services. gotta keep it fresh πŸ¦‹


😭 Updating /etc/rd?.c/ by the package (KNOWN PROBLEM) 😭

okay this part is the messy part. buckle in.

Rcconf saves /etc/rc?.d/[SK]NNname conditions into /var/lib/rcconf/services. this file is updated only when there exists /etc/rc?.d/SNNname. which means the condition is not saved if /etc/rc?.d/SNNname doesn't exist for the package. πŸ’€

so here's the cursed scenario: if the old version of the package creates both /etc/rc?.d/SNNname and /etc/rc?.d/KNNname, but the newer (updated) version of the package creates only /etc/rc?.d/KNNname, then some stupid condition occurs. that is, rcconf displays this package as OFF state even though the updated package doesn't have /etc/rc?.d/SNNname. that's because rcconf can't detect the disappearance of /etc/rc?.d/SNNname and the previous /etc/rc?.d/SNNname condition remains in /var/lib/rcconf/services for restore. it's literally holding a grudge 😭

in that situation, remove the entry (the corresponding package line) from /var/lib/rcconf/services. that's the fix, bestie. you're welcome 🫢


πŸŽ€ FILE πŸŽ€

  • /var/lib/rcconf/services β€” the service number data file.
  • /var/lib/rcconf/lock β€” the lock file.
  • /var/lib/rcconf/guide.default β€” the Guide File that update-rcconf-guide generates.
  • /var/lib/rcconf/guide β€” the Guide File that a user (Administrator) can define.

🌈 SEE ALSO 🌈


πŸ‘‘ AUTHOR πŸ‘‘

Atsushi KAMOSHIDA <kamop@debian.org>


and that's the whole page, bestie!! go toggle some services, you absolute main character πŸ’–

this little love letter was rendered by perl v5.28.0, dated 2018-11-11 β€” mwah, xoxo πŸ’‹

πŸ“¦ where this page comes from