From 6761665b4af4d7108b8fe362694a6af309e9948f Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Mon, 16 Dec 2024 16:11:59 -0800 Subject: [PATCH] there can only be one /tmp --- Dockerfile.agnos | 2 +- userspace/files/fs_setup.service | 2 +- userspace/files/fstab | 2 +- userspace/usr/comma/fs_setup.sh | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile.agnos b/Dockerfile.agnos index ce6f17a2..5d02bede 100644 --- a/Dockerfile.agnos +++ b/Dockerfile.agnos @@ -241,7 +241,7 @@ RUN cd /usr/lib/gcc/arm-none-eabi/* && \ RUN ldconfig # Setup RO rootfs -RUN mkdir -p /tmprw +RUN mkdir -p /rwtmp RUN mkdir -p /tmptmp COPY ./userspace/readonly_setup.sh /tmptmp/readonly_setup.sh RUN /tmptmp/readonly_setup.sh && rm -rf /tmptmp diff --git a/userspace/files/fs_setup.service b/userspace/files/fs_setup.service index 1c8c5157..224ee76d 100644 --- a/userspace/files/fs_setup.service +++ b/userspace/files/fs_setup.service @@ -1,6 +1,6 @@ [Unit] Description=Setup rootfs -After=data.mount tmp.mount tmprw.mount var.mount +After=data.mount tmp.mount rwtmp.mount var.mount Before=local-fs.target DefaultDependencies=no diff --git a/userspace/files/fstab b/userspace/files/fstab index eae30415..7273c2c1 100644 --- a/userspace/files/fstab +++ b/userspace/files/fstab @@ -6,4 +6,4 @@ /dev/nvme0n1 /data/media auto discard,nosuid,nodev,nofail,x-systemd.device-timeout=5s 0 0 tmpfs /var tmpfs rw,nosuid,nodev,size=128M,mode=755 0 0 tmpfs /tmp tmpfs rw,nosuid,nodev,size=150M,mode=1777 0 0 -tmpfs /tmprw tmpfs rw,nosuid,nodev,size=100M,mode=1777 0 0 +tmpfs /rwtmp tmpfs rw,nosuid,nodev,size=100M,mode=1777 0 0 diff --git a/userspace/usr/comma/fs_setup.sh b/userspace/usr/comma/fs_setup.sh index de6f71a8..62b66380 100755 --- a/userspace/usr/comma/fs_setup.sh +++ b/userspace/usr/comma/fs_setup.sh @@ -7,10 +7,10 @@ systemd-tmpfiles --create /usr/comma/tmpfiles.conf # setup /home -mkdir -p /tmprw/home_work -mkdir -p /tmprw/home_upper -chmod 755 /tmprw/* -mount -t overlay overlay -o lowerdir=/usr/default/home,upperdir=/tmprw/home_upper,workdir=/tmprw/home_work /home +mkdir -p /rwtmp/home_work +mkdir -p /rwtmp/home_upper +chmod 755 /rwtmp/* +mount -t overlay overlay -o lowerdir=/usr/default/home,upperdir=/rwtmp/home_upper,workdir=/rwtmp/home_work /home # /etc mkdir -p /data/etc