mirror of
https://github.com/tteck/Proxmox.git
synced 2025-02-15 06:09:15 +01:00
different groups host<>guest mapping
This commit is contained in:
parent
db9e449b2b
commit
7279ac22c1
1 changed files with 1 additions and 1 deletions
|
@ -272,7 +272,7 @@ lxc.idmap: u 0 100000 65536
|
|||
EOF
|
||||
#TODO internalize code to generate mapping instad of using external python script
|
||||
LXC_SUB_CONF=$(python3 -c "$(wget -qLO - https://raw.githubusercontent.com/ddimick/proxmox-lxc-idmapper/master/run.py)" \
|
||||
${VIDEO_GID}=${VIDEO_GID} ${TTY_GID}=${TTY_GID} ${INPUT_GID}=${INPUT_GID} ${AUDIO_GID}=${AUDIO_GID})
|
||||
${VIDEO_GID}=$(getent group video | cut -d: -f3) ${TTY_GID}=$(getent group tty | cut -d: -f3) ${INPUT_GID}=$(getent group input | cut -d: -f3) ${AUDIO_GID}=$(getent group audio | cut -d: -f3))
|
||||
echo "$LXC_SUB_CONF" | grep 'lxc.idmap: g ' >> $LXC_CONFIG
|
||||
# on host add rights to map gids but only if they are not already in the file
|
||||
echo "$LXC_SUB_CONF" | sed -n '/subgid/,// { /subgid/! p }' | while read line; do cat /etc/subgid | sed 's/[[:blank:]]*//g' | grep -qxF "$line" || echo $line >> /etc/subgid; done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue