Compare commits
6 Commits
openrc-0.1
...
openrc-0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0884271bdd | ||
|
|
f837107ca5 | ||
|
|
9c4582fbd7 | ||
|
|
ccb068c484 | ||
|
|
603a308c6a | ||
|
|
fba6bbb4b6 |
@@ -1,3 +1,3 @@
|
||||
NAME= openrc
|
||||
VERSION= 0.11.6
|
||||
VERSION= 0.11.8
|
||||
PKG= ${NAME}-${VERSION}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user