Commit 52480fc9 authored by Natanael Copa's avatar Natanael Copa

main/openrc: fix upgrading

The state dir moved to /run/openrc. We migrate the current state with
the post-upgrade script so we dont need to do reboot after upgrading
openrc
parent 4729520c
......@@ -2,7 +2,7 @@
pkgname=openrc
pkgver=0.10.5
_ver=${pkgver/_git*/}
pkgrel=1
pkgrel=2
pkgdesc="OpenRC manages the services, startup and shutdown of a host"
url="http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git"
arch="all"
......
#!/bin/sh
# in 0.8.0-r1 the state dir moved from /libexec/rc/init.d to /lib/rc/init.d
[ -d /libexec/rc/init.d ] || exit 0
for i in /libexec/rc/init.d/* ; do
[ -e "$i" ] || continue
mv $i /lib/rc/init.d/
# and with 0.10 it moved to /run/openrc
mkdir -p /run/openrc
for dir in /libexec /lib; do
[ -d $dir/rc/init.d ] || continue
for i in $dir/rc/init.d/* ; do
[ -e "$i" ] || continue
if [ -e /run/openrc/${i##*/} ]; then
rm -r $i
else
mv $i /run/openrc/
fi
done
rmdir $dir/rc/init.d $dir/rc /libexec 2>/dev/null
done
rmdir /libexec/rc/init.d /libexec/rc /libexec 2>/dev/null
# create rc.local compat
if [ -f /etc/rc.local ]; then
cat >/etc/local.d/rc.local-compat.start<<__EOF__
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment