diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2012-12-03 18:33:21 -0600 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2012-12-03 18:33:21 -0600 |
commit | a9272f50f75849f5d7a787cab4c54f5a2d158f58 (patch) | |
tree | 918c5ec537b4add4c56d2446492507615aaab6ac /sh | |
parent | 31bcc6bee46c0d825ea71e76997af71af2fbad9a (diff) |
Do not add a prefix to the /run directory
This doesn't affect us on gentoo, but on archlinux, which has done the
/usr merge, OpenRC was looking for /run under PREFIX. /run is always at
the root level, so it shouldn't have prefix appended to it.
Reported-by: udeved@openrc4arch.site40.net
Diffstat (limited to 'sh')
-rw-r--r-- | sh/migrate-to-run.sh.in | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/sh/migrate-to-run.sh.in b/sh/migrate-to-run.sh.in index 6689f883..73978e7c 100644 --- a/sh/migrate-to-run.sh.in +++ b/sh/migrate-to-run.sh.in @@ -9,39 +9,38 @@ if ! mountinfo -q -f tmpfs "@LIBEXECDIR@/init.d"; then exit 0 fi -if [ ! -d "@PREFIX@/run" ]; then - eerror "'@PREFIX@/run' is not a directory." +if [ ! -d /run ]; then + eerror "/run is not a directory." eerror "This means the OpenRC dependency data cannot be migrated." - eerror "Please create the '@PREFIX@/run' directory and reboot the system." + eerror "Please create the /run directory and reboot the system." exit 1 fi -if ! mountinfo -q -f tmpfs "@PREFIX@/run"; then - for x in "@PREFIX@/run/."* "@PREFIX@/run/"*; do +if ! mountinfo -q -f tmpfs /run; then + for x in /run/.* /run/*; do case "$x" in - "@PREFIX@/run/."|"@PREFIX@/run/..") + /run/.|/run/..) continue ;; esac if [ -e "$x" ]; then - eerror "Your '@PREFIX@/run' directory contains files." + eerror "Your /run directory contains files." eerror "Please reboot the system." exit 1 fi done - mount -t tmpfs -o mode=0755,nosuid,nodev \ - tmpfs "@PREFIX@/run" 2> /dev/null + mount -t tmpfs -o mode=0755,nosuid,nodev tmpfs /run 2> /dev/null if [ $? != 0 ]; then - eerror "Unable to mount a tmpfs on '@PREFIX@/run'." + eerror "Unable to mount a tmpfs on /run." eerror "This means the OpenRC dependency data cannot be migrated." - eerror "Please create the '@PREFIX@/run' directory and reboot the system." + eerror "Please create the /run directory and reboot the system." exit 1 fi fi -rm -rf "@PREFIX@/run/openrc" -cp -a "@LIBEXECDIR@/init.d" "@PREFIX@/run/openrc" +rm -rf /run/openrc +cp -a "@LIBEXECDIR@/init.d" /run/openrc rc-update -u umount "@LIBEXECDIR@/init.d" rm -rf "@LIBEXECDIR@/init.d" |