Skip to content

Instantly share code, notes, and snippets.

@overplumbum
Created November 16, 2012 15:23
Show Gist options
  • Save overplumbum/4088154 to your computer and use it in GitHub Desktop.
Save overplumbum/4088154 to your computer and use it in GitHub Desktop.
Permament fix for /run/shm creation in Ubuntu LXC guest systems (oneiric..precise)
#!/bin/bash
# https://bugs.launchpad.net/launchpad/+bug/974584
# common oneiric-lxc-guest bug
grep --silent "/run/shm" /lib/init/fstab || echo "none /run/shm tmpfs nosuid,nodev 0 0" >> /lib/init/fstab
mkdir -p /run/shm
mount /run/shm
# required for systems after manual dirty fixing
test -L /dev/shm || ( umount /dev/shm ; rm -fr /dev/shm && ln -s /run/shm /dev/ )
# just a test
python -c "import multiprocessing ; mp = multiprocessing.Pool(2)" && echo "everything is fine"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment