diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/config/env/acct-group/incus b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/acct-group/incus new file mode 100644 index 0000000000..f274734fba --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/acct-group/incus @@ -0,0 +1,13 @@ +# This is used to convert regular user / group entries to +# userdb entries (in JSON format) to later be consumed by userdbd +# when loading the sysext image on the instance. +# The user / groups will be created dynamically and if the sysext image is +# removed the entries will be removed as well. +cros_post_src_install_add_userdb_record(){ + insinto /usr/lib/userdb + newins - ${ACCT_GROUP_NAME}.group < <( + printf '{"groupName":"%q","gid":%q}\n' \ + "${ACCT_GROUP_NAME}" \ + "${_ACCT_GROUP_ID/#-*/-}" + ) +} diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/config/env/acct-group/incus-admin b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/acct-group/incus-admin new file mode 100644 index 0000000000..f274734fba --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/acct-group/incus-admin @@ -0,0 +1,13 @@ +# This is used to convert regular user / group entries to +# userdb entries (in JSON format) to later be consumed by userdbd +# when loading the sysext image on the instance. +# The user / groups will be created dynamically and if the sysext image is +# removed the entries will be removed as well. +cros_post_src_install_add_userdb_record(){ + insinto /usr/lib/userdb + newins - ${ACCT_GROUP_NAME}.group < <( + printf '{"groupName":"%q","gid":%q}\n' \ + "${ACCT_GROUP_NAME}" \ + "${_ACCT_GROUP_ID/#-*/-}" + ) +} diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/config/env/acct-group/lxc b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/acct-group/lxc new file mode 100644 index 0000000000..f274734fba --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/acct-group/lxc @@ -0,0 +1,13 @@ +# This is used to convert regular user / group entries to +# userdb entries (in JSON format) to later be consumed by userdbd +# when loading the sysext image on the instance. +# The user / groups will be created dynamically and if the sysext image is +# removed the entries will be removed as well. +cros_post_src_install_add_userdb_record(){ + insinto /usr/lib/userdb + newins - ${ACCT_GROUP_NAME}.group < <( + printf '{"groupName":"%q","gid":%q}\n' \ + "${ACCT_GROUP_NAME}" \ + "${_ACCT_GROUP_ID/#-*/-}" + ) +}