diff options
Diffstat (limited to 'core/modules/run-virt/data/opt/openslx/scripts/includes/setup_virtual_floppy.inc')
-rw-r--r-- | core/modules/run-virt/data/opt/openslx/scripts/includes/setup_virtual_floppy.inc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/core/modules/run-virt/data/opt/openslx/scripts/includes/setup_virtual_floppy.inc b/core/modules/run-virt/data/opt/openslx/scripts/includes/setup_virtual_floppy.inc new file mode 100644 index 00000000..4b8e10aa --- /dev/null +++ b/core/modules/run-virt/data/opt/openslx/scripts/includes/setup_virtual_floppy.inc @@ -0,0 +1,21 @@ +############################################## +# Include: Setup virtual floppy for drive b: # +############################################## + +# Copy guest configuration (with added information) config.xml to be accessed +# via virtual floppy +cp "$xmlfile" "$VMCHOOSER_DIR/fd-loop/config.xml" + +# Add another file with resolution information +xrandr | grep -o -E 'connected\s*(primary)?\s*[0-9]+x[0-9]+\+0\+0' | grep -o -E '[0-9]+x[0-9]+' | head -n 1 > "$VMCHOOSER_DIR/fd-loop/hostres.txt" + +# Add our magic openslx binary that sets the correct guest resolution +cp "$VMCHOOSER_DIR/data/openslx.exe" "$VMCHOOSER_DIR/fd-loop/" +cp "$VMCHOOSER_DIR/data/SHARELWS.BAT" "$VMCHOOSER_DIR/fd-loop/" +rm "$VMCHOOSER_DIR/fd-loop/SHARELW.CFG" + +for SHARE in $(grep -o -E '^SLX_SHARE_.*_PATH' /opt/openslx/config); do + eval "echo -n \$${SHARE} | /opt/openslx/bin/tr '/' '\' " >> "$VMCHOOSER_DIR/fd-loop/SHARELW.CFG" + #eval echo -n " \$${SHARE%PATH}AUTH_PASS /user:\$${SHARE%PATH}AUTH_USER" >> "$VMCHOOSER_DIR/fd-loop/SHARELW.CFG" + echo -e '\r\n' >> "$VMCHOOSER_DIR/fd-loop/SHARELW.CFG" +done |