diff options
Diffstat (limited to 'community/lxd/lxd.pre-install')
-rw-r--r-- | community/lxd/lxd.pre-install | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/community/lxd/lxd.pre-install b/community/lxd/lxd.pre-install new file mode 100644 index 00000000000..ac00da3cd0f --- /dev/null +++ b/community/lxd/lxd.pre-install @@ -0,0 +1,13 @@ +#!/bin/sh + +addgroup -S lxd 2>/dev/null + +for file in /etc/subuid /etc/subgid; do + if ! $(grep -q root "$file"); then + echo "root:1000000:1000000000" >> "$file" + else + sed -i 's/^root.*/root:1000000:1000000000/' "$file" + fi +done + +exit 0 |