| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| From: | "Ralf Habacker" <ralf DOT habacker AT freenet DOT de> |
| To: | "cygwin" <cygwin AT cygwin DOT com> |
| Subject: | [PATCH] package base-files: fix no global set of profile.d settings |
| Date: | Mon, 15 Sep 2003 14:32:47 +0200 |
| Message-ID: | <CMEOLNOLLCGCMPJLBKJPAEMJIDAA.ralf.habacker@freenet.de> |
| MIME-Version: | 1.0 |
| X-Priority: | 3 (Normal) |
| X-MSMail-Priority: | Normal |
| Importance: | Normal |
| X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2800.1106 |
Hi,
the base-files package release 2.2-1 contains an error, which prevents
global setting environment vars of profile.d scripts.
The problem is in the line
/bin/find /etc/profile.d -iname '*.sh' -type f | while read f; do
the pipe seems to create a subshell, which limits the live time of the
environment vars of the profile.d scripts to the end of the done statement.
(see below)
# Run all of the profile.d scripts
# Note that these are supplied by separate packages
/bin/find /etc/profile.d -iname '*.sh' -type f | while read f; do
if [ -f "$f" ]; then
. "$f"
fi
done
##>> here no profile.d env vars set
Cheers
Ralf
ChangeLog
2003-08-23 Ralf Habacker <ralf DOT habacker AT freenet DOT de>
* etc/defaults/etc/profile: Fix problem not setting
environment vars through profile.d scripts.
$ diff -up etc/defaults/etc/profile.old etc/defaults/etc/profile
--- etc/defaults/etc/profile.old 2003-09-15 14:19:46.000000000 +0200
+++ etc/defaults/etc/profile 2003-09-15 14:20:14.000000000 +0200
@@ -47,7 +47,7 @@ fi
# Run all of the profile.d scripts
# Note that these are supplied by separate packages
-/bin/find /etc/profile.d -iname '*.sh' -type f | while read f; do
+for f in `/bin/find /etc/profile.d -iname '*.sh' -type f`; do
if [ -f "$f" ]; then
. "$f"
fi
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |