Created
December 3, 2024 10:11
-
-
Save sentient06/336ba40598e06425bf75ab80fab1e779 to your computer and use it in GitHub Desktop.
Classic Macintosh Projects - Script for mounting volume image on QEMU
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Path to your CD-ROM image | |
CDROM_IMAGE="$1" | |
# Send commands to QEMU monitor socket | |
send_monitor_command() { | |
printf "$1\n" | nc -U /tmp/qemu-monitor.sock | |
} | |
# Eject current media (if any) | |
send_monitor_command "eject -f cd0" | |
# Insert new media | |
send_monitor_command "change cd0 $CDROM_IMAGE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment