summaryrefslogtreecommitdiff
path: root/sh/init.sh.Linux.in
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2012-12-06 16:43:24 -0600
committerWilliam Hubbs <w.d.hubbs@gmail.com>2012-12-06 16:43:24 -0600
commite5173b9127a42b7c6a209c278fbbcbcd29dcdccc (patch)
treebaae69c041726d0f61c6f0d88d65db6aea55c354 /sh/init.sh.Linux.in
parenta9272f50f75849f5d7a787cab4c54f5a2d158f58 (diff)
downloadopenrc-e5173b9127a42b7c6a209c278fbbcbcd29dcdccc.tar.gz
openrc-e5173b9127a42b7c6a209c278fbbcbcd29dcdccc.tar.bz2
openrc-e5173b9127a42b7c6a209c278fbbcbcd29dcdccc.tar.xz
migrate-to-run: do not require a reboot
The script that migrates the @libexecdir@/rc/init.d directory to /run/openrc should not require a reboot. Reported-by: chainsaw@gentoo.org
Diffstat (limited to 'sh/init.sh.Linux.in')
-rw-r--r--sh/init.sh.Linux.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/sh/init.sh.Linux.in b/sh/init.sh.Linux.in
index 0eca736..f45eae1 100644
--- a/sh/init.sh.Linux.in
+++ b/sh/init.sh.Linux.in
@@ -51,6 +51,10 @@ if [ ! -d /run ]; then
fi
fi
+if [ -L /run/openrc ]; then
+ rm /run/openrc
+fi
+
if [ "$sys" = VSERVER ]; then
rm -rf /run/*
elif ! mountinfo -q /run; then
@@ -84,5 +88,9 @@ if [ -e "$RC_LIBEXECDIR"/cache/deptree ]; then
cp -p "$RC_LIBEXECDIR"/cache/* "$RC_SVCDIR" 2>/dev/null
fi
+if [ -e "$RC_LIBEXECDIR"/init.d ]; then
+ rm -rf "$RC_LIBEXECDIR"/init.d
+fi
+
echo sysinit >"$RC_SVCDIR"/softlevel
exit 0