Skip to content

Commit

Permalink
make sure targetarch is always defined
Browse files Browse the repository at this point in the history
we had some error: /usr/lib/fai/subroutines: line 967: [: =: unary operator expected
  • Loading branch information
Thomas Lange committed Jul 23, 2019
1 parent b599986 commit b65b4ac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/subroutines
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,7 @@ task_partition() {

call_debootstrap() {

local targetarch
local dversion=$(dpkg-query -Wf '${Version}\n' debootstrap)
echo "Creating base system using debootstrap version $dversion"

Expand All @@ -958,6 +959,7 @@ call_debootstrap() {
_debootstrap=qemu-debootstrap
if [ -z "$targetarch" ]; then
_debootstrap=debootstrap
targetarch=$hostarch1
else
if [ $targetarch = $hostarch1 ]; then
_debootstrap=debootstrap
Expand Down

0 comments on commit b65b4ac

Please sign in to comment.