mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-14 21:29:05 +00:00

Signed-off-by: ChangZhuo Chen (陳昌倬) <czchen@gmail.com> Acked-by: Stéphane Graber <stgraber@ubuntu.com>
26 lines
492 B
Bash
Executable File
26 lines
492 B
Bash
Executable File
#!/bin/sh -
|
|
|
|
# lxc.devsetup - Setup host /dev for container /dev subdirectories.
|
|
|
|
if [ ! -d /dev/.lxc ]
|
|
then
|
|
echo "Creating /dev/.lxc"
|
|
mkdir /dev/.lxc
|
|
chmod 755 /dev/.lxc
|
|
fi
|
|
|
|
if grep -q "/dev devtmpfs " /proc/self/mounts
|
|
then
|
|
echo "/dev is devtmpfs"
|
|
else
|
|
echo "/dev is not devtmpfs - mounting tmpfs on .lxc"
|
|
mount -t tmpfs tmpfs /dev/.lxc
|
|
fi
|
|
|
|
if [ ! -d /dev/.lxc/user ]
|
|
then
|
|
echo "Creating /dev/.lxc/user"
|
|
mkdir /dev/.lxc/user
|
|
chmod 1777 /dev/.lxc/user
|
|
fi
|