Skip to content

Commit

Permalink
there can only be one /tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
adeebshihadeh committed Dec 17, 2024
1 parent 68d829a commit 6761665
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.agnos
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion userspace/files/fs_setup.service
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion userspace/files/fstab
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions userspace/usr/comma/fs_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6761665

Please sign in to comment.