This commit is contained in:
Kroese
2023-03-27 22:44:39 +02:00
parent 8be5ad2b3c
commit d9c2246022
2 changed files with 10 additions and 3 deletions

11
run.sh
View File

@@ -2,6 +2,11 @@
set -eu
if [ ! -f "/run/server.sh" ]; then
echo "Script must run inside Docker container!"
exit 1
fi
/run/server.sh 5000 "<HTML><BODY><H1><CENTER>Please wait while Synology is installing...</CENTER></H1></BODY></HTML>" > /dev/null &
[ ! -f "/images/boot.img" ] && rm -f /images/dsm.pat
@@ -94,7 +99,7 @@ fi
FILE="/images/data.img"
if [ ! -f "$FILE" ]; then
truncate -s $SPACE $FILE
truncate -s $DISK_SIZE $FILE
mkfs.ext4 -q $FILE
fi
@@ -148,7 +153,7 @@ ip link set dev $QEMU_BRIDGE up
touch /var/lib/misc/udhcpd.leases
# Finally, start our DHCPD server
udhcpd -I $DUMMY_DHCPD_IP -f $DHCPD_CONF_FILE &
udhcpd -I $DUMMY_DHCPD_IP -f $DHCPD_CONF_FILE 2>&1 &
echo "Launching Synology Serial Emulator..."
@@ -185,3 +190,5 @@ exec qemu-system-x86_64 -name Synology -enable-kvm -nographic -serial mon:stdio
-device scsi-hd,bus=hw-userdata.0,channel=0,scsi-id=0,lun=0,drive=drive-userdata,id=userdata0,bootindex=3 \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2
exit 0