Add an option to fork ldconfig in env-update, #182794. Also, preserve the entire line in /etc/env.d/foo if it begins with $

This commit is contained in:
Roy Marples
2007-07-09 10:26:02 +00:00
parent e03844fd26
commit 53d17a1be2
4 changed files with 44 additions and 14 deletions

View File

@ -336,10 +336,14 @@ char **rc_get_config (char **list, const char *file)
entry = rc_xstrdup (token);
do {
/* Bash variables are usually quoted */
token = strsep (&p, "\"\'");
} while ((token) && (strlen (token) == 0));
/* Preserve shell coloring */
if (*p == '$')
token = p;
else
do {
/* Bash variables are usually quoted */
token = strsep (&p, "\"\'");
} while ((token) && (strlen (token) == 0));
/* Drop a newline if that's all we have */
i = strlen (token) - 1;