summaryrefslogtreecommitdiffstats
path: root/core/openrc/openrc.post-upgrade
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-06-05 09:48:41 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-06-05 09:48:41 +0000
commitab05e4a8cd09cac121bf397d2e894dae123e9236 (patch)
treedceb9cdbccb9818c9e37dadc257ed666312f1296 /core/openrc/openrc.post-upgrade
parentda3316a3321595daefbbd9d399a509ff349af1f8 (diff)
downloadaports-ab05e4a8cd09cac121bf397d2e894dae123e9236.tar.bz2
aports-ab05e4a8cd09cac121bf397d2e894dae123e9236.tar.xz
core/openrc: add post-upgrade script that moves the state dir to new location
state dir has moved to /libexec/rc/init.d. By move the state in post-upgrade we dont need to reboot.
Diffstat (limited to 'core/openrc/openrc.post-upgrade')
-rw-r--r--core/openrc/openrc.post-upgrade9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/openrc/openrc.post-upgrade b/core/openrc/openrc.post-upgrade
new file mode 100644
index 00000000..b09f2f24
--- /dev/null
+++ b/core/openrc/openrc.post-upgrade
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# in 0.5.x the state dir moved from /lib/rc/init.d to /libexec/rc/init.d
+
+[ -d /lib/rc/init.d ] || exit 0
+
+mv /lib/rc/init.d/* /libexec/rc/init.d/
+rmdir /lib/rc/init.d
+exit 0