1 --- rc-scripts-1.6.14.fix/sbin/env-update.sh 2006-03-25 00:49:08.000000000 +0200
2 +++ rc-scripts-1.6.14/sbin/env-update.sh 2006-09-05 21:24:53.230270433 +0300
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
24 - This utility generates /etc/profile.env and /etc/csh.env
25 - from the contents of /etc/env.d/
26 + This utility generates /etc/profile.env and /etc/csh.env
27 + from the contents of /etc/env.d/
32 -export SVCDIR="${svcdir}"
33 +# bool is_older_than(reference, files/dirs to check)
35 +# return 0 if any of the files/dirs are newer than
38 +# EXAMPLE: if is_older_than a.out *.o ; then ...
45 + [[ ${x} -nt ${ref} ]] && return 0
47 + if [[ -d ${x} ]] ; then
48 + is_older_than "${ref}" "${x}"/* && return 0
55 +export SVCDIR="/var/cache"
57 # Only update if files have actually changed
60 +if [ "$1" == "-u" ]; then
61 is_older_than "${svcdir}/envcache" /etc/env.d && exit 0
67 +if [ "$#" -ne 0 ]; then
71 - -f /lib/rcscripts/awk/functions.awk \
72 - -f /lib/rcscripts/awk/genenviron.awk
75 + -f /lib/functions.awk \
76 + -f /lib/genenviron.awk
81 --- rc-scripts-1.6.14/src/awk/genenviron.awk 2005-09-10 05:28:19.000000000 +0300
82 +++ /usr/lib/genenviron.awk 2006-03-25 00:42:33.000000000 +0200
87 - extension("/lib/rcscripts/filefuncs.so", "dlload")
88 + extension("/lib/filefuncs.so", "dlload")
90 # Get our environment variables
91 SVCDIR = ENVIRON["SVCDIR"]
92 --- rc-scripts-1.6.14/src/awk/genenviron.awk 2006-04-30 14:30:43.608236656 +0300
93 +++ rc-scripts-1.6.14/src/awk/genenviron.awk 2006-09-01 02:12:10.772056818 +0300
95 if (x in TMPENVFILES) {
97 if ((isfile(TMPENVFILES[x])) &&
98 - (TMPENVFILES[x] !~ /((\.(sh|c|bak))|\~)$/)) {
99 + (TMPENVFILES[x] !~ /((\.(sh|c|bak|rpm(new|save|orig)))|\~)$/)) {
104 print "" >> (CSHPROFILE)
107 - pipe = "bash " ENVCACHE
108 + pipe = "sh " ENVCACHE
109 while ((pipe | getline) > 0) {