Unverified Commit 4a0dbc6c authored by Kroese's avatar Kroese Committed by GitHub
Browse files

fix: Shared memory path (#378)

parent cc952a81
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -60,9 +60,9 @@ if [[ "${BOOT_MODE,,}" != "legacy" ]]; then

    if [[ "$TPM" == [Yy1]* ]]; then

      mkdir -p /dev/shm/tpm
      chmod 755 /dev/shm/tpm
      swtpm socket -t -d --tpmstate dir=/dev/shm/tpm --ctrl type=unixio,path=/run/swtpm-sock --tpm2
      mkdir -p /run/shm/tpm
      chmod 755 /run/shm/tpm
      swtpm socket -t -d --tpmstate dir=/run/shm/tpm --ctrl type=unixio,path=/run/swtpm-sock --tpm2

      for (( i = 1; i < 50; i++ )); do

+4 −2
Original line number Diff line number Diff line
@@ -16,8 +16,10 @@ ARGS="$DEF_OPTS $CPU_OPTS $RAM_OPTS $MAC_OPTS $DISPLAY_OPTS $MON_OPTS $SERIAL_OP
ARGS=$(echo "$ARGS" | sed 's/\t/ /g' | tr -s ' ')

if [[ "${DISPLAY,,}" == "web" ]]; then
  rm -f /dev/shm/msg.html
  rm -f /dev/shm/index.html
  [ ! -f "$INFO" ] && error "File $INFO not found?!"
  rm -f "$INFO"
  [ ! -f "$PAGE" ] && error "File $PAGE not found?!"
  rm -f "$PAGE"
else
  if [[ "${DISPLAY,,}" == "vnc" ]]; then
    html "You can now connect to VNC on port 5900." "0"
+3 −3
Original line number Diff line number Diff line
@@ -28,8 +28,8 @@ echo
# Helper variables

STORAGE="/storage"
INFO="/dev/shm/msg.html"
PAGE="/dev/shm/index.html"
INFO="/run/shm/msg.html"
PAGE="/run/shm/index.html"
TEMPLATE="/var/www/index.html"
FOOTER1="$APP for Docker v$(</run/version)"
FOOTER2="<a href='$SUPPORT'>$SUPPORT</a>"
@@ -113,7 +113,7 @@ addPackage () {
}

# Start webserver
cp -r /var/www/* /dev/shm
cp -r /var/www/* /run/shm
html "Starting $APP for Docker..."
nginx -e stderr

+2 −2
Original line number Diff line number Diff line
@@ -27,9 +27,9 @@ server {

    location / {

      root /dev/shm;
      root /run/shm;

      if ( -f /dev/shm/index.html) {
      if ( -f /run/shm/index.html) {
        break;
      }