dracut-install,dracut: fix ldd output parsing

dracut-install could not handle output like:
	/lib/$LIB/liblsp.so => /lib/lib64/liblsp.so (0x00007faf00727000)

also unset LD_PRELOAD, so we get a clean environment
Harald Hoyer 2014-01-17 11:52:43 +01:00
parent d1e9a5e384
commit cb97abc7bb
2 changed files with 6 additions and 1 deletions

View File

@ -545,6 +545,7 @@ export LC_ALL=C
export LANG=C
unset NPATH
unset LD_LIBRARY_PATH
unset LD_PRELOAD
unset GREP_OPTIONS

export DRACUT_LOG_LEVEL=warning

View File

@ -391,7 +391,11 @@ static int resolve_deps(const char *src)
if (strstr(buf, destrootdir))
break;

p = strchr(buf, '/');
p = strstr(buf, "=>");
if (!p)
p = buf;

p = strchr(p, '/');
if (p) {
for (q = p; *q && *q != ' ' && *q != '\n'; q++) ;
*q = '\0';