Unverified Commit 6422aec7 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

fix: Remove cat (#561)

parent fcd7b8a8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -11,4 +11,4 @@ jobs:
      - name: Run ShellCheck
        uses: ludeeus/action-shellcheck@master
env:
        SHELLCHECK_OPTS: -x --source-path=src -e SC2001 -e SC2002 -e SC2223 -e SC2034 -e SC2064 -e SC2317 -e SC2153 -e SC2028
        SHELLCHECK_OPTS: -x --source-path=src -e SC2001 -e SC2223 -e SC2034 -e SC2064 -e SC2317 -e SC2153 -e SC2028
+2 −2
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ address="/run/shm/qemu.ip"

[ ! -f  "$file" ] && echo "DSM has not enabled networking yet.." && exit 1

location=$(cat "$file")
location=$(<"$file")

if ! curl -m 20 -ILfSs "http://$location/" > /dev/null; then

@@ -19,7 +19,7 @@ if ! curl -m 20 -ILfSs "http://$location/" > /dev/null; then
    echo "Failed to reach DSM at port $port"
  else
    echo "Failed to reach DSM at http://$location"
    ip="$(cat "$address")"
    ip=$(<"$address")
  fi

  echo "You might need to whitelist IP $ip in the DSM firewall." && exit 1
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ set -Eeuo pipefail
: ${URL:=''}    # URL of the PAT file to be downloaded.

if [ -f "$STORAGE/dsm.ver" ]; then
  BASE=$(cat "$STORAGE/dsm.ver")
  BASE=$(<"$STORAGE/dsm.ver")
else
  # Fallback for old installs
  BASE="DSM_VirtualDSM_42962"
+3 −3
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ finish() {

  if [ -f "$QEMU_PID" ]; then

    pid="$(cat "$QEMU_PID")"
    pid=$(<"$QEMU_PID")
    echo && error "Forcefully terminating QEMU process, reason: $reason..."
    { kill -15 "$pid" || true; } 2>/dev/null

@@ -65,7 +65,7 @@ terminal() {
  if [ -f "$QEMU_OUT" ]; then

    local msg
    msg="$(cat "$QEMU_OUT")"
    msg=$(<"$QEMU_OUT")

    if [ -n "$msg" ]; then

@@ -117,7 +117,7 @@ _graceful_shutdown() {
    finish "$code" && return "$code"
  fi

  pid="$(cat "$QEMU_PID")"
  pid=$(<"$QEMU_PID")

  if ! isAlive "$pid"; then
    echo && error "QEMU process does not exist?"
+2 −2
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ done

[ -f "$shutdown" ] && exit 1

location=$(cat "$file")
location=$(<"$file")

if [[ "$location" != "20.20"* ]]; then

@@ -69,7 +69,7 @@ if [[ "$location" != "20.20"* ]]; then

else

  ip="$(cat "$address")"
  ip=$(<"$address")
  port="${location##*:}"

  if [[ "$ip" == "172."* ]]; then
Loading