blob: 88ad3c6d081c21fc739dd3306e4f538a7c592833 [file] [log] [blame]
Richard Marian Thomaiyara2a20872019-11-02 21:16:40 +05301#
2# This function is intended to add root to corresponding groups if 'debug-tweaks' or 'allow-root-login' is in IMAGE_FEATURES.
3#
4update_root_user_groups () {
Patrick Williamsaf48f632023-03-20 10:13:55 -05005 if [ -e ${IMAGE_ROOTFS}/etc/group ]; then
6 sed -i '/^\(ipmi\|web\|redfish\|priv-admin\):.*:.*:$/s/$/root/' ${IMAGE_ROOTFS}/etc/group
7 fi
Richard Marian Thomaiyara2a20872019-11-02 21:16:40 +05308}
9# Add root user to the needed groups
10ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-root-login' ], "update_root_user_groups; ", "", d)}'