Compare commits

..

6 Commits

Author SHA1 Message Date
William Hubbs
0884271bdd init-linux: Do not remove the $rc_libexecdir/init.d directory
Reported-by: toralf.foerster@gmx.de
X-Gentoo-Bug: 446342
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=446342
2012-12-07 09:53:28 -06:00
William Hubbs
f837107ca5 bump version 2012-12-07 09:53:28 -06:00
William Hubbs
9c4582fbd7 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
2012-12-06 17:57:00 -06:00
William Hubbs
ccb068c484 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
2012-12-06 17:57:00 -06:00
William Hubbs
603a308c6a Typo Fix 2012-12-06 17:57:00 -06:00
William Hubbs
fba6bbb4b6 start work on openrc-0.11.7 2012-12-06 17:06:47 -06:00
5 changed files with 18 additions and 34 deletions

View File

@@ -1,3 +1,3 @@
NAME= openrc
VERSION= 0.11.6
VERSION= 0.11.8
PKG= ${NAME}-${VERSION}

View File

@@ -21,7 +21,7 @@
rc_tty_number=12
# If you have cgroups turned on in your kernel, this switch controls
# whether or not a group for each controler is mounted under
# whether or not a group for each controller is mounted under
# /sys/fs/cgroup.
# Support for process management by cgroups is planned in the future,
# so if you turn this off, be aware that you may not be able to use that

View File

@@ -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

View File

@@ -9,41 +9,21 @@ if ! mountinfo -q -f tmpfs "@LIBEXECDIR@/init.d"; then
exit 0
fi
if [ ! -d "@PREFIX@/run" ]; then
eerror "'@PREFIX@/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."
exit 1
if [ ! -d /run ]; then
eerror "/run is not a directory."
eerror "moving /run to /run.pre-openrc"
mv /run /run.pre-openrc
mkdir /run
fi
if ! mountinfo -q -f tmpfs "@PREFIX@/run"; then
for x in "@PREFIX@/run/."* "@PREFIX@/run/"*; do
case "$x" in
"@PREFIX@/run/."|"@PREFIX@/run/..")
continue
;;
esac
if [ -e "$x" ]; then
eerror "Your '@PREFIX@/run' directory contains files."
eerror "Please reboot the system."
exit 1
fi
done
rm -rf /run/openrc
mount -t tmpfs -o mode=0755,nosuid,nodev \
tmpfs "@PREFIX@/run" 2> /dev/null
if [ $? != 0 ]; then
eerror "Unable to mount a tmpfs on '@PREFIX@/run'."
eerror "This means the OpenRC dependency data cannot be migrated."
eerror "Please create the '@PREFIX@/run' directory and reboot the system."
exit 1
fi
if ! mountinfo -q -f tmpfs /run; then
ln -s "@LIBEXECDIR@"/init.d /run/openrc
else
cp -a "@LIBEXECDIR@/init.d" /run/openrc
rc-update -u
fi
rm -rf "@PREFIX@/run/openrc"
cp -a "@LIBEXECDIR@/init.d" "@PREFIX@/run/openrc"
rc-update -u
umount "@LIBEXECDIR@/init.d"
rm -rf "@LIBEXECDIR@/init.d"
einfo "The OpenRC dependency data was migrated successfully."
exit 0

View File

@@ -40,7 +40,7 @@ __BEGIN_DECLS
#if defined(PREFIX)
#define RC_SVCDIR RC_LIBEXECDIR "/init.d"
#elif defined(__linux__)
#define RC_SVCDIR "@PREFIX@/run/openrc"
#define RC_SVCDIR "/run/openrc"
#else
#define RC_SVCDIR RC_LIBEXECDIR "/init.d"
#endif