Browse Source

lib: use correct name for qemu binfmt

The qemu-user-static package installs binfmts with -static appended to
the name. Match that behavior here.

Closes: #169 [via git-merge-pr]
Cameron Nemo 4 years ago
parent
commit
80f44ed81e
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib.sh.in

+ 2 - 2
lib.sh.in

@@ -251,8 +251,8 @@ register_binfmt() {
     fi
 
     # Only register if the map is incomplete
-    if [ ! -f /proc/sys/fs/binfmt_misc/qemu-$_cpu ] ; then
-        echo ":qemu-$_cpu:M::$_magic:$_mask:/usr/bin/$QEMU_BIN:" > /proc/sys/fs/binfmt_misc/register 2>/dev/null
+    if [ ! -f "/proc/sys/fs/binfmt_misc/$QEMU_BIN" ] ; then
+        echo ":$QEMU_BIN:M::$_magic:$_mask:/usr/bin/$QEMU_BIN:" > /proc/sys/fs/binfmt_misc/register 2>/dev/null
     fi
 
     # If the static binary isn't in the chroot then the chroot will