From fcc14bd8c566a012eb3117c8ff5c8ad12eb121b8 Mon Sep 17 00:00:00 2001 From: GodloveD Date: Fri, 21 Jul 2017 17:38:52 -0400 Subject: [PATCH] removing blank lines from nvliblist.conf --- etc/nvliblist.conf | 7 +++++++ libexec/cli/action_argparser.sh | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/etc/nvliblist.conf b/etc/nvliblist.conf index a9fcef0916..0fbb7b692a 100644 --- a/etc/nvliblist.conf +++ b/etc/nvliblist.conf @@ -1,3 +1,10 @@ +# +# Copyright (c) 2017, SingularityWare, LLC. All rights reserved. +# +# This software is licensed under a 3-clause BSD license. Please +# consult LICENSE file distributed with the sources of this project regarding +# your rights to use or distribute this software. +# # NVLIBLIST.CONF # This configuration file determines which NVIDIA libraries to search for on # the host system when the --nv option is invoked. You can edit it if you have diff --git a/libexec/cli/action_argparser.sh b/libexec/cli/action_argparser.sh index bb29ede409..b8dfb240ca 100644 --- a/libexec/cli/action_argparser.sh +++ b/libexec/cli/action_argparser.sh @@ -117,13 +117,13 @@ while true; do -n|--nv) shift SINGULARITY_NVLIBLIST=$(mktemp singularity-nvliblist.XXXXXXXX) - cat $SINGULARITY_sysconfdir"/singularity/nvliblist.conf" | grep -v "^#" > $SINGULARITY_NVLIBLIST + cat $SINGULARITY_sysconfdir"/singularity/nvliblist.conf" | grep -vE "^#|^\s*$" >$SINGULARITY_NVLIBLIST for i in $(ldconfig -p | grep -f "${SINGULARITY_NVLIBLIST}"); do if [ -f "$i" ]; then message 2 "Found NV library: $i\n" if [ -z "${SINGULARITY_CONTAINLIBS:-}" ]; then SINGULARITY_CONTAINLIBS="$i" - else + else SINGULARITY_CONTAINLIBS="$SINGULARITY_CONTAINLIBS,$i" fi fi