OpenRC: update to a newer snapshot from Gentoo.
This commit is contained in:
parent
3c953353e9
commit
9f192f5a0e
4 changed files with 3 additions and 181 deletions
|
@ -1,128 +0,0 @@
|
|||
diff --git init.d/network.in init.d/network.in
|
||||
index 7c406c5..135e5d8 100644
|
||||
--- init.d/network.in
|
||||
+++ init.d/network.in
|
||||
@@ -64,16 +64,8 @@ tentative()
|
||||
case "$RC_UNAME" in
|
||||
Linux)
|
||||
[ -x /sbin/ip ] || return 1
|
||||
- LC_ALL=C ip addr show | while read inet address rest; do
|
||||
- case "${inet}" in
|
||||
- inet6)
|
||||
- case "${rest}" in
|
||||
- *" "tentative*) return 2;;
|
||||
- esac
|
||||
- ;;
|
||||
- esac
|
||||
- done
|
||||
- [ $? = 2 ]
|
||||
+ [ -n "$(ip -f inet6 addr show tentative)" ]
|
||||
+ ;;
|
||||
*)
|
||||
local inet= address= rest=
|
||||
LC_ALL=C ifconfig -a | while read inet address rest; do
|
||||
@@ -232,8 +224,6 @@ start()
|
||||
if [ "$RC_UNAME" = "Linux" ]; then
|
||||
ifconfig lo 127.0.0.1 netmask 255.0.0.0 || cr=1
|
||||
route add -net 127.0.0.0 netmask 255.0.0.0 \
|
||||
- gw 127.0.0.1 2>/dev/null
|
||||
- route add -net 127.0.0.0 netmask 255.0.0.0 \
|
||||
gw 127.0.0.1 reject 2>/dev/null
|
||||
else
|
||||
ifconfig lo0 127.0.0.1 netmask 255.0.0.0 || cr=1
|
||||
@@ -289,9 +279,14 @@ start()
|
||||
r=5
|
||||
while [ $r -gt 0 ]; do
|
||||
tentative || break
|
||||
+ [ $r = 5 ] && vebegin "Waiting for tentative addresses"
|
||||
sleep 1
|
||||
r=$(($r - 1))
|
||||
done
|
||||
+ if [ $r != 5 ]; then
|
||||
+ [ $r != 0 ]
|
||||
+ veend $?
|
||||
+ fi
|
||||
|
||||
if [ -n "$defaultroute" ]; then
|
||||
ebegin "Setting default route $defaultroute"
|
||||
diff --git net/bonding.sh net/bonding.sh
|
||||
index 793280b..559c9a1 100644
|
||||
--- net/bonding.sh
|
||||
+++ net/bonding.sh
|
||||
@@ -15,7 +15,7 @@ _is_bond()
|
||||
|
||||
bonding_pre_start()
|
||||
{
|
||||
- local x= s= slaves="$(_get_array "slaves_${IFVAR}")"
|
||||
+ local x= s= n= slaves="$(_get_array "slaves_${IFVAR}")"
|
||||
|
||||
[ -z "${slaves}" ] && return 0
|
||||
|
||||
@@ -43,9 +43,11 @@ bonding_pre_start()
|
||||
# Nice and dynamic :)
|
||||
for x in /sys/class/net/"${IFACE}"/bonding/*; do
|
||||
[ -f "${x}" ] || continue
|
||||
- eval s=\$${x##*/}_${IFVAR}
|
||||
+ n=${x##*/}
|
||||
+ eval s=\$${n}_${IFVAR}
|
||||
if [ -n "${s}" ]; then
|
||||
- echo "${s}" >"${x}"
|
||||
+ echo "${s}" >"${x}" || \
|
||||
+ eerror "Failed to configure $n (${n}_${IFVAR})"
|
||||
fi
|
||||
done
|
||||
|
||||
diff --git net/dhclient.sh net/dhclient.sh
|
||||
index 6c92c1f..65cacd3 100644
|
||||
--- net/dhclient.sh
|
||||
+++ net/dhclient.sh
|
||||
@@ -17,6 +17,7 @@ dhclient_start()
|
||||
|
||||
# Get our options
|
||||
# These options only work in Gentoo, and maybe RedHat
|
||||
+ eval args=\$dhclient_${IFVAR}
|
||||
eval opts=\$dhcp_${IFVAR}
|
||||
[ -z "${opts}" ] && opts=${dhcp}
|
||||
|
||||
diff --git net/iproute2.sh net/iproute2.sh
|
||||
index 0df8eef..906a45e 100644
|
||||
--- net/iproute2.sh
|
||||
+++ net/iproute2.sh
|
||||
@@ -160,7 +160,8 @@ _add_route()
|
||||
|
||||
# We cannot use a metric if we're using a nexthop
|
||||
if ! ${have_metric} && \
|
||||
- [ -n "${metric}" -a -z "${cmd##* nexthop }" ]
|
||||
+ [ -n "${metric}" -a \
|
||||
+ "${cmd##* nexthop }" = "$cmd" ]
|
||||
then
|
||||
cmd="${cmd} metric ${metric}"
|
||||
fi
|
||||
diff --git scripts/on_ac_power scripts/on_ac_power
|
||||
index 0804952..9ef1df4 100755
|
||||
--- scripts/on_ac_power
|
||||
+++ scripts/on_ac_power
|
||||
@@ -9,6 +9,10 @@ if [ -f /proc/acpi/ac_adapter/AC*/state ]; then
|
||||
"state:"*"off-line") return 128;;
|
||||
esac
|
||||
done
|
||||
+elif [ -f /sys/class/power_supply/AC*/online ]; then
|
||||
+ cat /sys/class/power_supply/AC*/online | while read line; do
|
||||
+ [ "${line}" = 0 ] && return 128
|
||||
+ done
|
||||
elif [ -f /proc/pmu/info ]; then
|
||||
cat /proc/pmu/info | while read line; do
|
||||
case "$line" in
|
||||
diff --git src/rc/rc.c src/rc/rc.c
|
||||
index 6d04b3d..ccafbe3 100644
|
||||
--- src/rc/rc.c
|
||||
+++ src/rc/rc.c
|
||||
@@ -773,7 +773,7 @@ handle_bad_signal(int sig)
|
||||
#endif
|
||||
|
||||
#include "_usage.h"
|
||||
-#define getoptstring "o:" getoptstring_COMMON
|
||||
+#define getoptstring "o:s:S" getoptstring_COMMON
|
||||
static const struct option longopts[] = {
|
||||
{ "override", 1, NULL, 'o' },
|
||||
{ "service", 1, NULL, 's' },
|
|
@ -1,12 +0,0 @@
|
|||
--- pkgconfig/Makefile.orig 2010-10-28 03:47:39.000000000 +0200
|
||||
+++ pkgconfig/Makefile 2010-10-28 03:48:00.000000000 +0200
|
||||
@@ -2,7 +2,8 @@ DIR= ${LIBDIR}/pkgconfig
|
||||
SRCS= einfo.pc.in openrc.pc.in
|
||||
INC= einfo.pc openrc.pc
|
||||
|
||||
-sed -n -e 's/^VERSION=[[:space:]]*\([^[:space:]]*\).*/#define VERSION "\1${GITVER}\"/p' ../../Makefile > version.h
|
||||
+all:
|
||||
+ sed -n -e 's/^VERSION=[[:space:]]*\([^[:space:]]*\).*/#define VERSION "\1${GITVER}\"/p' ../Makefile.inc > version.h
|
||||
|
||||
SED_EXTRA= -e 's:@VERSION@:${VERSION}:g'
|
||||
|
|
@ -7,7 +7,6 @@ xbps changes:
|
|||
* Modified inittab to pass correct parameters to reboot(8).
|
||||
* Sets unicode, rc_logger and rc_shell in /etc/rc.conf by default.
|
||||
* Sets windowkeys and fix_euro in /etc/conf.d/keymaps by default.
|
||||
* In local service, start/stop vmware-tools services if script exists.
|
||||
* The sysfs service mounts /var/run, /var/lock and /var/tmp as tmpfs with
|
||||
appropiate permissions.
|
||||
* The bootmisc service no longer cleans up /var/run, as it is now mounted tmpfs.
|
||||
|
@ -70,16 +69,6 @@ xbps changes:
|
|||
# To fix this, set to "yes"
|
||||
-fix_euro="NO"
|
||||
+fix_euro="yes"
|
||||
--- mk/prog.mk.orig 2009-10-21 11:00:28.000000000 +0200
|
||||
+++ mk/prog.mk 2009-10-21 11:00:36.000000000 +0200
|
||||
@@ -17,7 +17,6 @@ _DYNLINK_SH= if test "${PREFIX}" = "" &
|
||||
fi
|
||||
_DYNLINK!= ${_DYNLINK_SH}
|
||||
LDFLAGS+= ${_DYNLINK}$(shell ${_DYNLINK_SH})
|
||||
-LDFLAGS+= -Wl,-rpath=${PREFIX}/${LIBNAME}
|
||||
LDFLAGS+= ${PROGLDFLAGS}
|
||||
|
||||
CLEANFILES+= ${OBJS} ${PROG}
|
||||
--- mk/lib.mk.orig 2009-10-21 11:00:57.000000000 +0200
|
||||
+++ mk/lib.mk 2009-10-21 11:01:17.000000000 +0200
|
||||
@@ -32,7 +32,7 @@ lib${LIB}.a: ${OBJS} ${STATICOBJS}
|
||||
|
@ -91,32 +80,6 @@ xbps changes:
|
|||
|
||||
${SHLIB_NAME}: ${SOBJS}
|
||||
@${ECHO} building shared library $@
|
||||
--- conf.d/local.orig 2009-11-27 03:24:48.619351115 +0100
|
||||
+++ conf.d/local 2009-11-27 03:26:21.519479673 +0100
|
||||
@@ -5,6 +5,11 @@ local_start() {
|
||||
# This is a good place to load any misc programs
|
||||
# on startup (use &>/dev/null to hide output)
|
||||
|
||||
+ # Start vmware-tools services if script exists.
|
||||
+ if [ -x /etc/init.d/vmware-tools ]; then
|
||||
+ /etc/init.d/vmware-tools start
|
||||
+ fi
|
||||
+
|
||||
# We should always return 0
|
||||
return 0
|
||||
}
|
||||
@@ -13,6 +18,11 @@ local_stop() {
|
||||
# This is a good place to unload any misc.
|
||||
# programs you started above.
|
||||
|
||||
+ # Stop vmware-tools services if script exists
|
||||
+ if [ -x /etc/init.d/vmware-tools ]; then
|
||||
+ /etc/init.d/vmware-tools stop
|
||||
+ fi
|
||||
+
|
||||
# We should always return 0
|
||||
return 0
|
||||
}
|
||||
--- etc/rc.conf.in.orig 2009-12-05 03:30:48.675483763 +0100
|
||||
+++ etc/rc.conf.in 2009-12-05 03:31:13.034222373 +0100
|
||||
@@ -18,7 +18,7 @@
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
# Template file for 'OpenRC'
|
||||
pkgname=OpenRC
|
||||
version=0.6.1
|
||||
revision=4
|
||||
version=20110211
|
||||
wrksrc=openrc-${version}
|
||||
distfiles="http://roy.marples.name/downloads/openrc/openrc-$version.tar.bz2"
|
||||
distfiles="http://xbps.nopcode.org/distfiles/openrc-$version.tar.bz2"
|
||||
build_style=custom-install
|
||||
short_desc="Universal init system"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
checksum=c7847254e41b613b76ae570cf786ce8164d637962ad4580d0825b4b62b475e07
|
||||
checksum=16840a9635648e501e2f94464f6cf1c26b6bbdbbc7e3d9a1f8466117271885e1
|
||||
long_desc="
|
||||
OpenRC is a dependency based init system that works with the system
|
||||
provided init program, normally /sbin/init. It is not a replacement for
|
||||
|
|
Loading…
Reference in a new issue