[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.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
talk:howtos:general_admin:openrc [2015/05/18 17:54 (UTC)] – sorry for not noticing question before aaditya | talk:howtos:general_admin:openrc [2018/11/06 19:35 (UTC)] – add section for migration to openrc 0.39+ aaditya | ||
---|---|---|---|
Line 22: | Line 22: | ||
--- // | --- // | ||
+ | |||
+ | === 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 / |