Skip to content

Commit

Permalink
lxc-download: Ignore return code from subshell
Browse files Browse the repository at this point in the history
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 <stgraber@ubuntu.com>
  • Loading branch information
stgraber committed Feb 27, 2014
1 parent ead1515 commit 969b7d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/lxc-download.in
Expand Up @@ -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)" ] && \
Expand Down

0 comments on commit 969b7d7

Please sign in to comment.