diff options
author | Karel Kočí <cynerd@email.cz> | 2019-04-28 18:58:56 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2019-04-28 18:58:56 +0200 |
commit | decb3606471b8a65687a72e13f6aec0fd7debb82 (patch) | |
tree | 20f636e79d5c34c8dc3088e76669aefe6572f7e2 | |
parent | 090bf5e725ccc9e20b230286444e9f2cd81146c8 (diff) | |
download | laminar-cnf-decb3606471b8a65687a72e13f6aec0fd7debb82.tar.gz laminar-cnf-decb3606471b8a65687a72e13f6aec0fd7debb82.tar.bz2 laminar-cnf-decb3606471b8a65687a72e13f6aec0fd7debb82.zip |
uchroot: fix usage with qemu
-rwxr-xr-x | scripts/uchroot | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/scripts/uchroot b/scripts/uchroot index b94e14f..dd3d77a 100755 --- a/scripts/uchroot +++ b/scripts/uchroot @@ -35,8 +35,6 @@ shift exit 1 } -EXECUTOR= - mount --rbind "$ROOT" "$ROOT" mount -t proc none "$ROOT/proc" mount --rbind /dev "$ROOT/dev" @@ -48,10 +46,10 @@ done <<<"$MOUNT" cp -f /etc/resolv.conf "$ROOT/etc/resolv.conf" cp -f /etc/hosts "$ROOT/etc/hosts" -if [ -n "$ARCH" -a "$ARCH" != "$(arch)" ]; then - cp -f "$(which "qemu-$ARCH")" "$ROOT/qemu" - EXECUTOR=/qemu +if [ "$ARCH" != "$(arch)" ]; then + qemu_exec="$(which "qemu-$ARCH")" + cp -f "$qemu_exec" "$ROOT$qemu_exec" fi -exec chroot "$ROOT" $EXECUTOR /bin/sh -c \ +exec chroot "$ROOT" /bin/sh -c \ ". /etc/profile && exec su -l $USR $CMD \"\$@\"" -- "$@" |