1 --- rc-scripts-1.6.14/sbin/env-update.sh 2004-12-03 05:56:17.000000000 +0200
2 +++ rc-scripts-1.6.14.fix/sbin/env-update.sh 2006-03-25 00:49:08.000000000 +0200
6 # Copyright 1999-2004 Gentoo Foundation
7 # Distributed under the terms of the GNU General Public License v2
8 +# Copyright 2006 PLD Linux
11 -source /etc/init.d/functions.sh || exit 1
12 +. /etc/rc.d/init.d/functions || exit 1
14 -if [ "${EUID}" -ne 0 ]
16 - eerror "$0: must be root."
17 +if [ "$(id -u)" != 0 ]; then
18 + nls "%s: must be root." $0
23 echo "usage: env-update.sh
26 - This utility generates /etc/profile.env and /etc/csh.env
27 - from the contents of /etc/env.d/
28 + This utility generates /etc/profile.env and /etc/csh.env
29 + from the contents of /etc/env.d/
34 -export SVCDIR="${svcdir}"
35 +# bool is_older_than(reference, files/dirs to check)
37 +# return 0 if any of the files/dirs are newer than
40 +# EXAMPLE: if is_older_than a.out *.o ; then ...
47 + [[ ${x} -nt ${ref} ]] && return 0
49 + if [[ -d ${x} ]] ; then
50 + is_older_than "${ref}" "${x}"/* && return 0
57 +export SVCDIR="/var/cache"
59 # Only update if files have actually changed
62 +if [ "$1" == "-u" ]; then
63 is_older_than "${svcdir}/envcache" /etc/env.d && exit 0
69 +if [ "$#" -ne 0 ]; then
73 - -f /lib/rcscripts/awk/functions.awk \
74 - -f /lib/rcscripts/awk/genenviron.awk
76 + -f /lib/functions.awk \
77 + -f /lib/genenviron.awk
82 --- rc-scripts-1.6.14/src/awk/genenviron.awk 2005-09-10 05:28:19.000000000 +0300
83 +++ /usr/lib/genenviron.awk 2006-03-25 00:42:33.000000000 +0200
88 - extension("/lib/rcscripts/filefuncs.so", "dlload")
89 + extension("/lib/filefuncs.so", "dlload")
91 # Get our environment variables
92 SVCDIR = ENVIRON["SVCDIR"]
93 --- rc-scripts-1.6.14/src/awk/genenviron.awk~ 2006-04-30 14:29:39.116790228 +0300
94 +++ rc-scripts-1.6.14/src/awk/genenviron.awk 2006-04-30 14:30:43.608236656 +0300
96 if (x in TMPENVFILES) {
98 if ((isfile(TMPENVFILES[x])) &&
99 - (TMPENVFILES[x] !~ /((\.(sh|c|bak))|\~)$/)) {
100 + (TMPENVFILES[x] !~ /((\.(sh|c|bak|rpm(new|save|orig)))|\~)$/)) {