Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Shared memory path #378

Merged
merged 7 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 4 additions & 2 deletions src/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions src/reset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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>"
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions web/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down