diff options
Diffstat (limited to 'remote/modules/run-virt/data/opt/openslx/scripts')
| -rw-r--r-- | remote/modules/run-virt/data/opt/openslx/scripts/includes/setup_virtual_floppy.inc | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/remote/modules/run-virt/data/opt/openslx/scripts/includes/setup_virtual_floppy.inc b/remote/modules/run-virt/data/opt/openslx/scripts/includes/setup_virtual_floppy.inc index e74423ec..09430718 100644 --- a/remote/modules/run-virt/data/opt/openslx/scripts/includes/setup_virtual_floppy.inc +++ b/remote/modules/run-virt/data/opt/openslx/scripts/includes/setup_virtual_floppy.inc @@ -16,7 +16,12 @@ mkfs.fat "${FLOPPYIMG}" || mkfs.vfat "${FLOPPYIMG}" || mkdosfs "${FLOPPYIMG}" # Create file with resolution information etc. . "/opt/openslx/inc/shares" -[ -z "$SHARE_REMAP_MODE" ] && SHARE_REMAP_MODE="3" +if [ -z "$SHARE_REMAP_MODE" ]; then + SHARE_REMAP_MODE_INI="0" + SHARE_REMAP_MODE="3" +else + SHARE_REMAP_MODE_INI="$SHARE_REMAP_MODE" +fi [ -z "$SHARE_CREATE_MISSING_REMAP" ] && SHARE_CREATE_MISSING_REMAP="1" RESOLUTION=$(xrandr | grep -o -E 'connected\s*(primary)?\s*[0-9]+x[0-9]+\+0\+0' \ | grep -o -E -m1 '[0-9]+x[0-9]+') @@ -25,7 +30,7 @@ cat > "${TMPDIR}/geraffel.ini" <<-HIER [openslx] resolution=${RESOLUTION} createMissingRemap=${SHARE_CREATE_MISSING_REMAP} -remapMode=${SHARE_REMAP_MODE} +remapMode=${SHARE_REMAP_MODE_INI} homeDrive=${SHARE_HOME_DRIVE} [remap] @@ -36,8 +41,14 @@ media=${SHARE_MEDIA} other=${SHARE_OTHER} HIER +# Legacy: hostres.txt +cat > "${TMPDIR}/hostres.txt" <<-HIER +${RESOLUTION} +This file is deprecated! Use geraffel.ini +HIER + # Create file for network shares to mount -SHARES="${TMPDIR}/shares.dat" +declare -rg SHARES="${TMPDIR}/shares.dat" touch "${SHARES}" chmod 0600 "${SHARES}" if pwdaemon --query "${TMPHOME}/.pwsocket" > "${SHARES}"; then @@ -54,9 +65,8 @@ if pwdaemon --query "${TMPHOME}/.pwsocket" > "${SHARES}"; then fi # Copy all them files into floppy image -mcopy -i "${FLOPPYIMG}" "${TMPDIR}/geraffel.ini" "::/" +mcopy -i "${FLOPPYIMG}" "${TMPDIR}/geraffel.ini" "${TMPDIR}/hostres.txt" "${SHARES}" "::/" mcopy -i "${FLOPPYIMG}" "$VMCHOOSER_DIR/data/openslx.exe" "::/" -mcopy -i "${FLOPPYIMG}" "${SHARES}" "::/" -rm -f -- "${SHARES}" +rm -f -- "${SHARES}" "${TMPDIR}/geraffel.ini" "${TMPDIR}/hostres.txt" unset SHARES VAR NETHOME |
