Created
October 29, 2022 21:29
-
-
Save cerebrate/7e9932bf82e85e8ccad9ed2c35c5bfb8 to your computer and use it in GitHub Desktop.
Fix for /dev/shm being mounted at /run/shm under WSL.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Fix the /dev/shm symlink to be a mount | |
DefaultDependencies=no | |
Before=sysinit.target | |
ConditionPathExists=/dev/shm | |
ConditionPathIsSymbolicLink=/dev/shm | |
ConditionPathIsMountPoint=/run/shm | |
[Service] | |
Type=oneshot | |
ExecStart=/usr/bin/rm /dev/shm | |
ExecStart=/usr/bin/mkdir /dev/shm | |
ExecStart=/bin/umount /run/shm | |
ExecStart=/usr/bin/rmdir /run/shm | |
ExecStart=/bin/mount -t tmpfs -o mode=1777,nosuid,nodev,strictatime tmpfs /dev/shm | |
ExecStart=/usr/bin/ln -s /dev/shm /run/shm | |
[Install] | |
WantedBy=sysinit.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment