Author: glen                         Date: Sun Apr 30 11:16:03 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- restore file

---- Files affected:
SOURCES:
   env-update.patch (1.2 -> 1.3)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/env-update.patch
diff -u /dev/null SOURCES/env-update.patch:1.3
--- /dev/null   Sun Apr 30 13:16:03 2006
+++ SOURCES/env-update.patch    Sun Apr 30 13:15:58 2006
@@ -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"]
================================================================
_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to