From fc74a26e3525caa05678c6fdac6dd2bc09c6009a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 30 Apr 2006 11:16:55 +0000 Subject: [PATCH 1/1] - restore file Changed files: env-update-cflags.patch -> 1.3 env-update.patch -> 1.3 --- env-update-cflags.patch | 11 +++++ env-update.patch | 92 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 env-update-cflags.patch create mode 100644 env-update.patch diff --git a/env-update-cflags.patch b/env-update-cflags.patch new file mode 100644 index 0000000..c79a7be --- /dev/null +++ b/env-update-cflags.patch @@ -0,0 +1,11 @@ +--- rc-scripts-1.6.14/src/filefuncs/Makefile~ 2003-04-06 18:28:27.000000000 +0200 ++++ rc-scripts-1.6.14/src/filefuncs/Makefile 2006-03-25 17:55:00.000000000 +0100 +@@ -6,7 +6,7 @@ + all: $(TARGETS) + + filefuncs.o: filefuncs.c +- $(CC) -shared -Wall -DHAVE_CONFIG_H -c -O -fPIC -I/usr/include/awk $^ ++ $(CC) -shared -Wall -DHAVE_CONFIG_H -c $(CFLAGS) -fPIC -I/usr/include/awk $^ + + filefuncs.so: filefuncs.o + $(LD) -o $@ -shared $^ diff --git a/env-update.patch b/env-update.patch new file mode 100644 index 0000000..2388d91 --- /dev/null +++ b/env-update.patch @@ -0,0 +1,92 @@ +--- rc-scripts-1.6.14/sbin/env-update.sh 2004-12-03 05:56:17.000000000 +0200 ++++ rc-scripts-1.6.14.fix/sbin/env-update.sh 2006-03-25 00:49:08.000000000 +0200 +@@ -1,13 +1,13 @@ +-#!/bin/bash ++#!/bin/sh + # Copyright 1999-2004 Gentoo Foundation + # Distributed under the terms of the GNU General Public License v2 ++# Copyright 2006 PLD Linux + # $Header$ + +-source /etc/init.d/functions.sh || exit 1 ++. /etc/rc.d/init.d/functions || exit 1 + +-if [ "${EUID}" -ne 0 ] +-then +- eerror "$0: must be root." ++if [ "$(id -u)" != 0 ]; then ++ nls "%s: must be root." $0 + exit 1 + fi + +@@ -15,29 +15,48 @@ + echo "usage: env-update.sh + + note: +- This utility generates /etc/profile.env and /etc/csh.env +- from the contents of /etc/env.d/ ++ This utility generates /etc/profile.env and /etc/csh.env ++ from the contents of /etc/env.d/ + " + exit 1 + } + +-export SVCDIR="${svcdir}" ++# bool is_older_than(reference, files/dirs to check) ++# ++# return 0 if any of the files/dirs are newer than ++# the reference file ++# ++# EXAMPLE: if is_older_than a.out *.o ; then ... ++is_older_than() { ++ local x= ++ local ref="$1" ++ shift ++ ++ for x in "$@" ; do ++ [[ ${x} -nt ${ref} ]] && return 0 ++ ++ if [[ -d ${x} ]] ; then ++ is_older_than "${ref}" "${x}"/* && return 0 ++ fi ++ done ++ ++ return 1 ++} ++ ++export SVCDIR="/var/cache" + + # Only update if files have actually changed +-if [ "$1" == "-u" ] +-then ++if [ "$1" == "-u" ]; then + is_older_than "${svcdir}/envcache" /etc/env.d && exit 0 + shift + fi + +-if [ "$#" -ne 0 ] +-then ++if [ "$#" -ne 0 ]; then + usage + else +- /bin/gawk \ +- -f /lib/rcscripts/awk/functions.awk \ +- -f /lib/rcscripts/awk/genenviron.awk ++ gawk \ ++ -f /usr/lib/functions.awk \ ++ -f /usr/lib/genenviron.awk + fi + +- + # vim:ts=4 +--- rc-scripts-1.6.14/src/awk/genenviron.awk 2005-09-10 05:28:19.000000000 +0300 ++++ /usr/lib/genenviron.awk 2006-03-25 00:42:33.000000000 +0200 +@@ -3,7 +3,7 @@ + + BEGIN { + +- extension("/lib/rcscripts/filefuncs.so", "dlload") ++ extension("/usr/lib/filefuncs.so", "dlload") + + # Get our environment variables + SVCDIR = ENVIRON["SVCDIR"] -- 2.44.0