diff --git a/all/usr/bin/fix-qemu-layout.sh b/all/usr/bin/fix-qemu-layout.sh index 31587fc..3d08edd 100644 --- a/all/usr/bin/fix-qemu-layout.sh +++ b/all/usr/bin/fix-qemu-layout.sh @@ -1,5 +1,9 @@ #!/bin/ash -cd /usr/local/bin/ -mv -f qemu-system-x86_64 qemu-system-x86_64.backup -cp -vf launcher.dat qemu-system-x86_64 -chmod 755 qemu-system-x86_64 + +if [ ! -f /var/packages/Virtualization/target/bin/qemu-system-x86_64.bin ]; then + + mv -f /var/packages/Virtualization/target/bin/qemu-system-x86_64 /var/packages/Virtualization/target/bin/qemu-system-x86_64.bin + mv -f /usr/bin/launcher /var/packages/Virtualization/target/bin/qemu-system-x86_64 + chmod ug+x /var/packages/Virtualization/target/bin/qemu-system-x86_64 + +fi diff --git a/all/usr/bin/launcher.dat b/all/usr/bin/launcher similarity index 93% rename from all/usr/bin/launcher.dat rename to all/usr/bin/launcher index 6b6adaf..f98a412 100644 Binary files a/all/usr/bin/launcher.dat and b/all/usr/bin/launcher differ diff --git a/install.sh b/install.sh index bd4a594..e74cf91 100644 --- a/install.sh +++ b/install.sh @@ -3,7 +3,7 @@ if [ "${1}" = "late" ]; then echo "Fix qemu-system-x86_64" mkdir -p /tmpRoot/usr/local/bin - cp -vf /usr/bin/launcher.dat /tmpRoot/usr/local/bin/launcher.dat + cp -vf /usr/bin/launcher /tmpRoot/usr/bin/launcher cp -vf /usr/bin/fix-qemu-layout.sh /tmpRoot/usr/local/bin/fix-qemu-layout.sh chmod ug+x /tmpRoot/usr/local/bin/fix-qemu-layout.sh diff --git a/src/compile.sh b/src/compile.sh index 523c05a..8d03ab5 100644 --- a/src/compile.sh +++ b/src/compile.sh @@ -1 +1 @@ -docker run --rm -v "$PWD":/src -w /src gcc gcc launcher.c -o ../all/usr/bin/launcher.dat +docker run --rm -v "$PWD":/src -w /src gcc gcc launcher.c -o launcher diff --git a/src/launcher.c b/src/launcher.c index 7850fb7..f0d5720 100644 --- a/src/launcher.c +++ b/src/launcher.c @@ -18,7 +18,7 @@ int main(int argc, char *argv[]) { exit(EXIT_FAILURE); } - child_argv[0] = "/var/packages/Virtualization/target/bin/qemu-system-x86_64"; // nom du programme exécuté + child_argv[0] = "/var/packages/Virtualization/target/bin/qemu-system-x86_64.bin"; // nom du programme exécuté //child_argv[0] = "/bin/echo"; child_argv[1] = "-k"; child_argv[2] = "fr";