Unverified Commit 1fc9c56c authored by Kroese's avatar Kroese Committed by GitHub
Browse files

style: Quote variables (#565)

parent 893a013a
Loading
Loading
Loading
Loading
+13 −13
Original line number Diff line number Diff line
@@ -3,12 +3,12 @@ set -Eeuo pipefail

# Docker environment variables

: "${DISK_IO:='native'}"          # I/O Mode, can be set to 'native', 'threads' or 'io_turing'
: "${DISK_FMT:='raw'}"            # Disk file format, 'raw' by default for best performance
: "${DISK_FLAGS:=''}"             # Specifies the options for use with the qcow2 disk format
: "${DISK_CACHE:='none'}"         # Caching mode, can be set to 'writeback' for better performance
: "${DISK_DISCARD:='on'}"         # Controls whether unmap (TRIM) commands are passed to the host.
: "${DISK_ROTATION:='1'}"         # Rotation rate, set to 1 for SSD storage and increase for HDD
: "${DISK_IO:="native"}"          # I/O Mode, can be set to 'native', 'threads' or 'io_turing'
: "${DISK_FMT:="raw"}"            # Disk file format, 'raw' by default for best performance
: "${DISK_FLAGS:=""}"             # Specifies the options for use with the qcow2 disk format
: "${DISK_CACHE:="none"}"         # Caching mode, can be set to 'writeback' for better performance
: "${DISK_DISCARD:="on"}"         # Controls whether unmap (TRIM) commands are passed to the host.
: "${DISK_ROTATION:="1"}"         # Rotation rate, set to 1 for SSD storage and increase for HDD

BOOT="$STORAGE/$BASE.boot.img"
SYSTEM="$STORAGE/$BASE.system.img"
@@ -472,14 +472,14 @@ fi

DISK4_FILE="/storage4/data4"

: "${DISK2_SIZE:=''}"
: "${DISK3_SIZE:=''}"
: "${DISK4_SIZE:=''}"
: "${DISK2_SIZE:=""}"
: "${DISK3_SIZE:=""}"
: "${DISK4_SIZE:=""}"

: "${DEVICE:=''}"        # Docker variables to passthrough a block device, like /dev/vdc1.
: "${DEVICE2:=''}"
: "${DEVICE3:=''}"
: "${DEVICE4:=''}"
: "${DEVICE:=""}"        # Docker variables to passthrough a block device, like /dev/vdc1.
: "${DEVICE2:=""}"
: "${DEVICE3:=""}"
: "${DEVICE4:=""}"

if [ -n "$DEVICE" ]; then
  addDevice "userdata" "$DEVICE" "device" "3" "0xc" || exit $?
+2 −2
Original line number Diff line number Diff line
@@ -3,8 +3,8 @@ set -Eeuo pipefail

# Docker environment variables

: "${GPU:='N'}"           # GPU passthrough
: "${DISPLAY:='none'}"  # Display type
: "${GPU:="N"}"           # GPU passthrough
: "${DISPLAY:="none"}"  # Display type

if [[ "$GPU" != [Yy1]* ]] || [[ "$ARCH" != "amd64" ]]; then

+1 −1
Original line number Diff line number Diff line
#!/usr/bin/env bash
set -Eeuo pipefail

: "${URL:=''}"    # URL of the PAT file to be downloaded.
: "${URL:=""}"    # URL of the PAT file to be downloaded.

if [ -f "$STORAGE/dsm.ver" ]; then
  BASE=$(<"$STORAGE/dsm.ver")
+8 −8
Original line number Diff line number Diff line
@@ -3,17 +3,17 @@ set -Eeuo pipefail

# Docker environment variables

: "${DHCP:='N'}"
: "${MAC:='02:11:32:AA:BB:CC'}"
: "${DHCP:="N"}"
: "${MAC:="02:11:32:AA:BB:CC"}"

: "${VM_NET_DEV:=''}"
: "${VM_NET_TAP:='dsm'}"
: "${VM_NET_DEV:=""}"
: "${VM_NET_TAP:="dsm"}"
: "${VM_NET_MAC:="$MAC"}"
: "${VM_NET_HOST:='VirtualDSM'}"
: "${VM_NET_HOST:="VirtualDSM"}"

: "${DNSMASQ_OPTS:=''}"
: "${DNSMASQ:='/usr/sbin/dnsmasq'}"
: "${DNSMASQ_CONF_DIR:='/etc/dnsmasq.d'}"
: "${DNSMASQ_OPTS:=""}"
: "${DNSMASQ:="/usr/sbin/dnsmasq"}"
: "${DNSMASQ_CONF_DIR:="/etc/dnsmasq.d"}"

ADD_ERR="Please add the following setting to your container:"

+1 −1
Original line number Diff line number Diff line
#!/usr/bin/env bash
set -Eeuo pipefail

: "${DHCP:='N'}"
: "${DHCP:="N"}"

info () { printf "%b%s%b" "\E[1;34m❯ \E[1;36m" "$1" "\E[0m\n" >&2; }
error () { printf "%b%s%b" "\E[1;31m❯ " "ERROR: $1" "\E[0m\n" >&2; }
Loading