Skip to content

Commit 0355630

Browse files
committed
config/acct-group: provide userdb group record
this is required when loading the sysext image to dynamically load / unload the groups provided by the image. Signed-off-by: Mathieu Tortuyaux <[email protected]>
1 parent df4b910 commit 0355630

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This is used to convert regular user / group entries to
2+
# userdb entries (in JSON format) to later be consumed by userdbd
3+
# when loading the sysext image on the instance.
4+
# The user / groups will be created dynamically and if the sysext image is
5+
# removed the entries will be removed as well.
6+
cros_post_src_install_add_userdb_record(){
7+
insinto /usr/lib/userdb
8+
newins - ${ACCT_GROUP_NAME}.group < <(
9+
printf '{"groupName":"%q","gid":%q}\n' \
10+
"${ACCT_GROUP_NAME}" \
11+
"${_ACCT_GROUP_ID/#-*/-}"
12+
)
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This is used to convert regular user / group entries to
2+
# userdb entries (in JSON format) to later be consumed by userdbd
3+
# when loading the sysext image on the instance.
4+
# The user / groups will be created dynamically and if the sysext image is
5+
# removed the entries will be removed as well.
6+
cros_post_src_install_add_userdb_record(){
7+
insinto /usr/lib/userdb
8+
newins - ${ACCT_GROUP_NAME}.group < <(
9+
printf '{"groupName":"%q","gid":%q}\n' \
10+
"${ACCT_GROUP_NAME}" \
11+
"${_ACCT_GROUP_ID/#-*/-}"
12+
)
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This is used to convert regular user / group entries to
2+
# userdb entries (in JSON format) to later be consumed by userdbd
3+
# when loading the sysext image on the instance.
4+
# The user / groups will be created dynamically and if the sysext image is
5+
# removed the entries will be removed as well.
6+
cros_post_src_install_add_userdb_record(){
7+
insinto /usr/lib/userdb
8+
newins - ${ACCT_GROUP_NAME}.group < <(
9+
printf '{"groupName":"%q","gid":%q}\n' \
10+
"${ACCT_GROUP_NAME}" \
11+
"${_ACCT_GROUP_ID/#-*/-}"
12+
)
13+
}

0 commit comments

Comments
 (0)