]> git.pld-linux.org Git - packages/env-update.git/commitdiff
- restore file
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 30 Apr 2006 11:16:55 +0000 (11:16 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    env-update-cflags.patch -> 1.3
    env-update.patch -> 1.3

env-update-cflags.patch [new file with mode: 0644]
env-update.patch [new file with mode: 0644]

diff --git a/env-update-cflags.patch b/env-update-cflags.patch
new file mode 100644 (file)
index 0000000..c79a7be
--- /dev/null
@@ -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 (file)
index 0000000..2388d91
--- /dev/null
@@ -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"]
This page took 0.063288 seconds and 4 git commands to generate.