Compare commits
11 Commits
openrc-0.1
...
openrc-0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0884271bdd | ||
|
|
f837107ca5 | ||
|
|
9c4582fbd7 | ||
|
|
ccb068c484 | ||
|
|
603a308c6a | ||
|
|
fba6bbb4b6 | ||
|
|
ded282f163 | ||
|
|
38ae822077 | ||
|
|
611ed42044 | ||
|
|
3f719bbb8b | ||
|
|
e37b84a37d |
@@ -1,3 +1,3 @@
|
|||||||
NAME= openrc
|
NAME= openrc
|
||||||
VERSION= 0.11.5
|
VERSION= 0.11.8
|
||||||
PKG= ${NAME}-${VERSION}
|
PKG= ${NAME}-${VERSION}
|
||||||
|
|||||||
@@ -1,20 +1,40 @@
|
|||||||
# Depending on how mounting your network file systems behaves when your
|
# You will need to set the dependencies in the netmount script to match
|
||||||
# network interfaces are down, you may need to set the netmount script to
|
# the network configuration tools you are using. This should be done in
|
||||||
# require specific network interfaces to be active. This file gives
|
# this file by following the examples below, and not by changing the
|
||||||
# examples of how to do this:
|
# service script itself.
|
||||||
#
|
#
|
||||||
# If you are using newnet and configuring the interface with a static
|
# Each of these examples is meant to be used separately. So, for
|
||||||
# address with the network script:
|
# example, do not set rc_need to something like "net.eth0 dhcpcd".
|
||||||
# rc_need="network"
|
#
|
||||||
|
# If you are using newnet and configuring your interfaces with static
|
||||||
|
# addresses with the network script, you should use this setting.
|
||||||
|
#
|
||||||
|
#rc_need="network"
|
||||||
#
|
#
|
||||||
# If you are using oldnet, you must list the specific net.* services you
|
# If you are using oldnet, you must list the specific net.* services you
|
||||||
# need:
|
# need.
|
||||||
#
|
#
|
||||||
# rc_need="net.eth0"
|
# This example assumes all of your netmounts can be reached on
|
||||||
# rc_need="net.eth1 net.eth2"
|
# eth0.
|
||||||
|
#
|
||||||
|
#rc_need="net.eth0"
|
||||||
|
#
|
||||||
|
# This example assumes some of your netmounts are on eth1 and some
|
||||||
|
# are on eth2.
|
||||||
|
#
|
||||||
|
#rc_need="net.eth1 net.eth2"
|
||||||
#
|
#
|
||||||
# If you are using a dynamic network management tool like
|
# If you are using a dynamic network management tool like
|
||||||
# networkmanager, dhcpcd, etc, you should list that tool here.
|
# networkmanager, dhcpcd in standalone mode, wicd, badvpn-ncd, etc, to
|
||||||
|
# manage the network interfaces with the routes to your netmounts, you
|
||||||
|
# should list that tool.
|
||||||
#
|
#
|
||||||
# rc_need="networkmanager"
|
#rc_need="networkmanager"
|
||||||
# rc_need="dhcpcd"
|
#rc_need="dhcpcd"
|
||||||
|
#rc_need="wicd"
|
||||||
|
#
|
||||||
|
# The default setting is designed to be backward compatible with our
|
||||||
|
# current setup, but you are highly discouraged from using this. In
|
||||||
|
# other words, please change it to be more suited to your system.
|
||||||
|
#
|
||||||
|
rc_need="net"
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
rc_tty_number=12
|
rc_tty_number=12
|
||||||
|
|
||||||
# If you have cgroups turned on in your kernel, this switch controls
|
# 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.
|
# /sys/fs/cgroup.
|
||||||
# Support for process management by cgroups is planned in the future,
|
# 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
|
# so if you turn this off, be aware that you may not be able to use that
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ start()
|
|||||||
|
|
||||||
if [ "$RC_UNAME" = Linux ]; then
|
if [ "$RC_UNAME" = Linux ]; then
|
||||||
no_netdev="-O no_netdev"
|
no_netdev="-O no_netdev"
|
||||||
|
if mountinfo -q /usr; then
|
||||||
|
touch $RC_SVCDIR/usr_premounted
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
ebegin "Mounting local filesystems"
|
ebegin "Mounting local filesystems"
|
||||||
mount -at "$types" $no_netdev
|
mount -at "$types" $no_netdev
|
||||||
@@ -48,7 +51,10 @@ stop()
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ "$RC_UNAME" = Linux ]; then
|
if [ "$RC_UNAME" = Linux ]; then
|
||||||
no_umounts_r="$no_umounts_r|/proc|/proc/.*|/run|/sys|/sys/.*|/usr"
|
no_umounts_r="$no_umounts_r|/proc|/proc/.*|/run|/sys|/sys/.*"
|
||||||
|
if [ -e $rc_svcdir/usr_premounted ]; then
|
||||||
|
no_umounts_r="$no_umounts_r|/usr"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
no_umounts_r="^($no_umounts_r)$"
|
no_umounts_r="^($no_umounts_r)$"
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,10 @@ if [ ! -d /run ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -L /run/openrc ]; then
|
||||||
|
rm /run/openrc
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$sys" = VSERVER ]; then
|
if [ "$sys" = VSERVER ]; then
|
||||||
rm -rf /run/*
|
rm -rf /run/*
|
||||||
elif ! mountinfo -q /run; then
|
elif ! mountinfo -q /run; then
|
||||||
|
|||||||
@@ -9,41 +9,21 @@ if ! mountinfo -q -f tmpfs "@LIBEXECDIR@/init.d"; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d "@PREFIX@/run" ]; then
|
if [ ! -d /run ]; then
|
||||||
eerror "'@PREFIX@/run' is not a directory."
|
eerror "/run is not a directory."
|
||||||
eerror "This means the OpenRC dependency data cannot be migrated."
|
eerror "moving /run to /run.pre-openrc"
|
||||||
eerror "Please create the '@PREFIX@/run' directory and reboot the system."
|
mv /run /run.pre-openrc
|
||||||
exit 1
|
mkdir /run
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! mountinfo -q -f tmpfs "@PREFIX@/run"; then
|
rm -rf /run/openrc
|
||||||
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
|
|
||||||
|
|
||||||
mount -t tmpfs -o mode=0755,nosuid,nodev \
|
if ! mountinfo -q -f tmpfs /run; then
|
||||||
tmpfs "@PREFIX@/run" 2> /dev/null
|
ln -s "@LIBEXECDIR@"/init.d /run/openrc
|
||||||
if [ $? != 0 ]; then
|
else
|
||||||
eerror "Unable to mount a tmpfs on '@PREFIX@/run'."
|
cp -a "@LIBEXECDIR@/init.d" /run/openrc
|
||||||
eerror "This means the OpenRC dependency data cannot be migrated."
|
rc-update -u
|
||||||
eerror "Please create the '@PREFIX@/run' directory and reboot the system."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf "@PREFIX@/run/openrc"
|
|
||||||
cp -a "@LIBEXECDIR@/init.d" "@PREFIX@/run/openrc"
|
|
||||||
rc-update -u
|
|
||||||
rm -rf "@LIBEXECDIR@/init.d"
|
|
||||||
umount "@LIBEXECDIR@/init.d"
|
|
||||||
einfo "The OpenRC dependency data was migrated successfully."
|
einfo "The OpenRC dependency data was migrated successfully."
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ __BEGIN_DECLS
|
|||||||
#if defined(PREFIX)
|
#if defined(PREFIX)
|
||||||
#define RC_SVCDIR RC_LIBEXECDIR "/init.d"
|
#define RC_SVCDIR RC_LIBEXECDIR "/init.d"
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__)
|
||||||
#define RC_SVCDIR "@PREFIX@/run/openrc"
|
#define RC_SVCDIR "/run/openrc"
|
||||||
#else
|
#else
|
||||||
#define RC_SVCDIR RC_LIBEXECDIR "/init.d"
|
#define RC_SVCDIR RC_LIBEXECDIR "/init.d"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user