Remove trailing comments when parsing ld.so.conf

This commit is contained in:
Pierre Pronchery 2018-07-08 11:54:40 +02:00
parent 0e114f8885
commit 94bc4e6025

View File

@ -66,11 +66,16 @@ _library_ldsoconf()
"#"*)
;;
"include "*)
#remove trailing comments
line="${line%#*}"
filename="${ldsoconf%/*}/${line#include }"
[ -f "$filename" ] &&
_library_ldsoconf "$filename"
;;
*)
#remove trailing comments
line="${line%#*}"
echo "$line"
;;
esac