[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.
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
talk:howtos:general_admin:openrc [2015/05/15 17:14 (UTC)] – created didierspaier | talk:howtos:general_admin:openrc [2018/11/06 19:35 (UTC)] – add section for migration to openrc 0.39+ aaditya | ||
---|---|---|---|
Line 10: | Line 10: | ||
--- // | --- // | ||
+ | |||
+ | Hi Didier, | ||
+ | |||
+ | Sorry, I did not notice your questions before. | ||
+ | |||
+ | For me, the primary reason for using OpenRC is that it provides standardization. Yes, it does offer some superior features, like dependency handling of services, cgroups support, service supervision, | ||
+ | |||
+ | It does not replace any components that I know of, sysvinit is used for booting and then handles control to OpenRC, and the services provided by Slackware in /etc/rc.d can also be used. | ||
+ | |||
+ | It can also provide a faster boot experience and supports parallel starting of services as well. | ||
+ | |||
+ | --- // | ||
+ | |||
+ | === Migrating to OpenRC 0.39+ from previous versions === | ||
+ | |||
+ | OpenRC 0.39, as shipped via [[https:// | ||
+ | |||
+ | * **openrc-init** is being used as init instead of /// | ||
+ | * Service and configuration directory has been changed to /// | ||
+ | |||
+ | Both these changes were done to have a clean{er} OpenRC install which can co-exist with other init systems like sysvinit (default), runit, etc, just by changing a boot parameter. | ||
+ | |||
+ | To change from /// | ||
+ | |||
+ | # migrate existing services | ||
+ | for service in / | ||
+ | svcname=$(basename " | ||
+ | if [ ! -e "/ | ||
+ | if [ -f "/ | ||
+ | cp -v "/ | ||
+ | elif [ -L "/ | ||
+ | # check if symlink is of a service | ||
+ | service_target=$(readlink -f " | ||
+ | service_target_name=$(basename " | ||
+ | if [ $(dirname " | ||
+ | ln -sv "/ | ||
+ | fi | ||
+ | fi | ||
+ | fi | ||
+ | done | ||
+ | | ||
+ | # enable existing services | ||
+ | for runlevel in / | ||
+ | for service in ${runlevel}/ | ||
+ | svcname=$(basename " | ||
+ | rvlname=$(basename " | ||
+ | if [ ! -e / | ||
+ | ln -sv / | ||
+ | fi | ||
+ | done | ||
+ | done | ||
+ | | ||
+ | # check config changes | ||
+ | for file in / | ||
+ | filename=$(basename " | ||
+ | extension=" | ||
+ | if [ " | ||
+ | continue | ||
+ | fi | ||
+ | if [ -e "/ | ||
+ | diff -Nupr "/ | ||
+ | fi | ||
+ | done | ||
+ | |||
+ | Config changes found above can be updated by hand or copy pasted in new location. | ||
+ | |||
+ | After checking that things are working expected, old files and folders can be renamed (or removed). | ||
+ | |||
+ | mv /etc/init.d / | ||
+ | mv /etc/conf.d / | ||
+ | mv / | ||
+ | mv / | ||
+ | |||
+ | Finally initial changes done by us can be reverted: | ||
+ | |||
+ | mv / | ||
+ | mv / |