From aa636371a079061e7ba685db1ebc8ecaea0733f8 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 3 Jan 2024 15:41:56 +0100 Subject: Don't use SLX_* variable name for local stuff --- .../opt/openslx/vmchooser/run-virt.d/setup_virtual_floppy.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'core/modules/run-virt/data') diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d/setup_virtual_floppy.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d/setup_virtual_floppy.inc index 52817f2f..3b1d9f18 100644 --- a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d/setup_virtual_floppy.inc +++ b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt.d/setup_virtual_floppy.inc @@ -3,13 +3,13 @@ ############################################## ## Functions ## setup_virtual_floppy() { - declare -rg SLX_FLOPPY_IMG="${TMPDIR}/floppy.img" + declare -rg floppy_img="${TMPDIR}/floppy.img" declare -r TMPHOME="${HOME}" # create floppy disk file + filesystem - dd "if=/dev/zero" "of=${SLX_FLOPPY_IMG}" count=1440 bs=1024 - chmod 0600 "${SLX_FLOPPY_IMG}" - mkfs.fat "${SLX_FLOPPY_IMG}" || mkdosfs "${SLX_FLOPPY_IMG}" + dd "if=/dev/zero" "of=${floppy_img}" count=1440 bs=1024 + chmod 0600 "${floppy_img}" + mkfs.fat "${floppy_img}" || mkdosfs "${floppy_img}" if [ -s "${TMPHOME}/.openslx/shares" ]; then $(safesource "${TMPHOME}/.openslx/shares") @@ -174,7 +174,7 @@ setup_virtual_floppy() { writelog "WARNING: Floppydir contains $size kb of data, will most likely not fit..." fi - if ! mcopy -s -i "${SLX_FLOPPY_IMG}" "${FLOPPYDIR}"/* "::/"; then + if ! mcopy -s -i "${floppy_img}" "${FLOPPYDIR}"/* "::/"; then writelog "Error creating floppy image from ${FLOPPYDIR}" elif ! $DEBUG; then rm -rf -- "${FLOPPYDIR}" -- cgit v1.2.3-55-g7522