install2, rootfs: Create groups necessary for joining a (AD) domain
This commit is contained in:
parent
89fd601968
commit
f30d929a45
24
features.in/build-distro/install2/image-scripts.d/86-all-groups
Executable file
24
features.in/build-distro/install2/image-scripts.d/86-all-groups
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/sh -efu
|
||||||
|
### Ensure that all the necesary system groups exist
|
||||||
|
|
||||||
|
SCRIPT="/usr/share/install2/postinstall.d/86-all-groups"
|
||||||
|
|
||||||
|
cat > "$SCRIPT" << EOF
|
||||||
|
#!/bin/sh -efu
|
||||||
|
|
||||||
|
. install2-init-functions
|
||||||
|
|
||||||
|
# don't override the script start message on the same line
|
||||||
|
echo "Ensuring that all the necesary system groups exist"
|
||||||
|
|
||||||
|
echo '/usr/share/install3/default-groups
|
||||||
|
/etc/alterator/auth/user-groups
|
||||||
|
/etc/alterator/auth/admin-groups' \
|
||||||
|
| while read LIST; do
|
||||||
|
[ -s "\$destdir\$LIST" ] || continue
|
||||||
|
for GROUP in \$(cat "\$destdir\$LIST"); do
|
||||||
|
exec_chroot groupadd -r "\$GROUP" &>/dev/null ||:
|
||||||
|
done
|
||||||
|
done
|
||||||
|
EOF
|
||||||
|
chmod +x "$SCRIPT"
|
13
features.in/build-distro/rootfs/image-scripts.d/30-all-groups
Executable file
13
features.in/build-distro/rootfs/image-scripts.d/30-all-groups
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh -eu
|
||||||
|
|
||||||
|
# ensure that all the necesary system groups exist
|
||||||
|
|
||||||
|
echo '/usr/share/install3/default-groups
|
||||||
|
/etc/alterator/auth/user-groups
|
||||||
|
/etc/alterator/auth/admin-groups' \
|
||||||
|
| while read LIST; do
|
||||||
|
[ -s "$LIST" ] || continue
|
||||||
|
for GROUP in $(cat "$LIST"); do
|
||||||
|
groupadd -r "$GROUP" &>/dev/null ||:
|
||||||
|
done
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user