From fda03e44e6dbe7bd13f68e0751b08e0fe5584106 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Graber?= Date: Thu, 27 Feb 2014 15:46:23 -0500 Subject: [PATCH] lxc-download: Ignore return code from subshell MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The previous change fixed parsing of multiple uid/gid ranges by using a while loop, however a failure in that loop will cause the script to exit (due to -e), so we need to ignore the return value of the commands inside that loop. Signed-off-by: Stéphane Graber --- templates/lxc-download.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/lxc-download.in b/templates/lxc-download.in index 732bd97b9..6a6bb1857 100644 --- a/templates/lxc-download.in +++ b/templates/lxc-download.in @@ -143,8 +143,8 @@ gpg_validate() { in_userns() { [ -e /proc/self/uid_map ] || { echo no; return; } awk '{ print $1 " " $2 " " $3 }' /proc/self/uid_map | while read line; do - [ "$line" = "0 0 4294967295" ] && { echo no; return; } - echo $line | grep -q " 0 1$" && { echo userns-root; return; } + [ "$line" = "0 0 4294967295" ] && { echo no; return; } || true + echo $line | grep -q " 0 1$" && { echo userns-root; return; } || true done [ "$(cat /proc/self/uid_map)" = "$(cat /proc/1/uid_map)" ] && \ -- 2.47.2