Added Samba, BusyBox and a bind shell service

This commit is contained in:
Héctor Molinero Fernández
2021-11-07 22:02:39 +01:00
parent 29e5bec8ba
commit 92dd9a8e7e
8 changed files with 110 additions and 6 deletions

12
scripts/bin/vmshell Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
set -eu
# Wait until bind shell is available
until printf 'exit\n' | nc 127.0.0.1 5151 >/dev/null 2>&1; do sleep 1; done
if [ -t 0 ] || [ -t 1 ]; then
exec rlwrap nc 127.0.0.1 5151
else
exec nc 127.0.0.1 5151
fi

View File

@ -6,7 +6,7 @@ set --
set -- "$@" -smp "${VM_CPU:?}" -m "${VM_RAM:?}"
set -- "$@" -serial stdio -monitor unix:/run/qemu-monitor,server,nowait -device VGA -display vnc=:0
set -- "$@" -drive file=/var/lib/qemu/reactos.qcow2,index=0,media=disk,format=qcow2
set -- "$@" -netdev user,id=n0,"${VM_NET_OPTIONS?}"
set -- "$@" -netdev user,id=n0,guestfwd=tcp:10.0.2.254:445-cmd:'nc 127.0.0.1 445',hostfwd=tcp::5151-:51,"${VM_NET_OPTIONS?}"
set -- "$@" -device e1000,netdev=n0
set -- "$@" -usb -device usb-tablet
set -- "$@" -k "${VM_KEYBOARD:?}"

7
scripts/service/smbd/run Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
set -eu
cd /run/samba/
exec 2>&1
exec /usr/sbin/smbd --foreground --log-stdout --debuglevel=3