[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howtos:general_admin:openrc [2018/11/30 19:01 (UTC)] – [openrc-init] remove extra clarification aadityahowtos:general_admin:openrc [2021/09/12 22:18 (UTC)] (current) – [OpenRC] we default to using openrc as init in slackware aaditya
Line 2: Line 2:
 ====== OpenRC ====== ====== OpenRC ======
  
-OpenRC is a dependency based service management system. It works with the system provided init program, normally ///sbin/init//.+OpenRC is a dependency based init system.
  
 ===== Features ===== ===== Features =====
Line 19: Line 19:
  
   # main tty   # main tty
-  ln -s /etc/init.d/agetty /etc/init.d/agetty.tty1+  ln -s /etc/openrc/init.d/agetty /etc/openrc/init.d/agetty.tty1
   /sbin/rc-update add agetty.tty1 default   /sbin/rc-update add agetty.tty1 default
          
-  cp /etc/conf.d/agetty /etc/conf.d/agetty.tty1 +  cp /etc/openrc/conf.d/agetty /etc/openrc/conf.d/agetty.tty1 
-  echo 'agetty_options="--noclear"' >> /etc/conf.d/agetty.tty1+  echo 'agetty_options="--noclear"' >> /etc/openrc/conf.d/agetty.tty1
      
   # additional ttys   # additional ttys
   for i in {2..6}; do   for i in {2..6}; do
-    ln -s /etc/init.d/agetty /etc/init.d/agetty.tty${i}+    ln -s /etc/openrc/init.d/agetty /etc/openrc/init.d/agetty.tty${i}
     /sbin/rc-update add agetty.tty${i} default     /sbin/rc-update add agetty.tty${i} default
   done   done
      
   # serial tty (for servers)   # serial tty (for servers)
-  ln -s /etc/init.d/agetty /etc/init.d/agetty.ttyS0+  ln -s /etc/openrc/init.d/agetty /etc/openrc/init.d/agetty.ttyS0
   /sbin/rc-update add agetty.ttyS0 default   /sbin/rc-update add agetty.ttyS0 default
      
-  cp /etc/conf.d/agetty /etc/conf.d/agetty.ttyS0 +  cp /etc/openrc/conf.d/agetty /etc/openrc/conf.d/agetty.ttyS0 
-  echo 'agetty_options="--noclear"' >> /etc/conf.d/agetty.ttyS0+  echo 'agetty_options="--noclear"' >> /etc/openrc/conf.d/agetty.ttyS0
  
 === Update boot parameters === === Update boot parameters ===
Line 47: Line 47:
 === Enable boot logging === === Enable boot logging ===
  
-The main configuration file for OpenRC is ///etc/rc.conf//, and contains various options.+The main configuration file for OpenRC is ///etc/openrc/rc.conf//, and contains various options.
  
 A common option that could be changed is to enable boot logging by setting ''rc_logger="YES"'', this way any errors encountered via booting could be logged and examined later (default log location is ///var/log/rc.log//). A common option that could be changed is to enable boot logging by setting ''rc_logger="YES"'', this way any errors encountered via booting could be logged and examined later (default log location is ///var/log/rc.log//).
Line 78: Line 78:
   # rc-update add sysklogd default   # rc-update add sysklogd default
   # rc-update add dcron default   # rc-update add dcron default
-  # rc-update add alsasound default  # for desktop+  # rc-update add alsasound boot  # for desktop
   # rc-update add consolekit default  # for desktop   # rc-update add consolekit default  # for desktop
   # rc-update add sshd default  # for server   # rc-update add sshd default  # for server
Line 104: Line 104:
 If using wifi with laptops the **NetworkManager** or **wicd** service could be enabled. The combination of dhcpcd and wpa_supplicant (along with a frontend like wpa_gui or wpa_cli) could also be used as a lightweight alternative. If using wifi with laptops the **NetworkManager** or **wicd** service could be enabled. The combination of dhcpcd and wpa_supplicant (along with a frontend like wpa_gui or wpa_cli) could also be used as a lightweight alternative.
  
-A static network can be configured by editing ///etc/conf.d/network//.+A static network can be configured by editing ///etc/openrc/conf.d/network//.
  
 === Display manager === === Display manager ===
  
-To boot to a graphical display manager, ///etc/conf.d/xdm// can be edited to specify the display manager, and the xdm service could be enabled:+To boot to a graphical display manager, ///etc/openrc/conf.d/xdm// can be edited to specify the display manager, and the xdm service could be enabled:
  
   # rc-update add xdm default   # rc-update add xdm default
Line 138: Line 138:
 ====== Configuration ====== ====== Configuration ======
  
-OpenRC services are present in the ///etc/init.d// folder, and corresponding configuration files are present in ///etc/conf.d//+OpenRC services are present in the ///etc/openrc/init.d// folder, and corresponding configuration files are present in ///etc/openrc/conf.d//
  
 Some common configuration files include: Some common configuration files include:
  
-  /etc/conf.d/modules    # modules to be loaded at boot +  /etc/openrc/conf.d/modules    # modules to be loaded at boot 
-  /etc/conf.d/hostname   # hostname of the system +  /etc/openrc/conf.d/hostname   # hostname of the system 
-  /etc/conf.d/keymaps    # console keymap+  /etc/openrc/conf.d/keymaps    # console keymap
  
 ===== Service management ===== ===== Service management =====
Line 160: Line 160:
  
 To shutdown or reboot, one will need to use **openrc-shutdown**. To shutdown from a desktop environment using ConsoleKit2, check out this [[https://github.com/ConsoleKit2/ConsoleKit2/pull/113|PR]]. To shutdown or reboot, one will need to use **openrc-shutdown**. To shutdown from a desktop environment using ConsoleKit2, check out this [[https://github.com/ConsoleKit2/ConsoleKit2/pull/113|PR]].
 +
 +==== Note ====
 +
 +The **ck-system-stop** and **ck-system-restart** files in the [[https://github.com/ConsoleKit2/ConsoleKit2/pull/113|PR]] can be saved to ///usr/local/sbin/poweroff// and ///usr/local/sbin/reboot// respectively. This allows using the **poweroff** and **reboot** commands like before.
  
 ====== Troubleshooting ====== ====== Troubleshooting ======
Line 205: Line 209:
 ===== Migrating from /etc/init.d to /etc/openrc/init.d ===== ===== Migrating from /etc/init.d to /etc/openrc/init.d =====
  
-OpenRC 0.39+, as //**planned**// to shipped via SBo, changes the service and configuration directory to ///etc/openrc// instead of ///etc//.+OpenRC 0.39+, as shipped via SBo, changes the service and configuration directory to ///etc/openrc// instead of ///etc//.
  
 This is being done to maintain greater compatibility with a vanilla Slackware install. This is being done to maintain greater compatibility with a vanilla Slackware install.
 howtos:general_admin:openrc ()