blob: 3485661b3d838d628fdba5870c25e583fbf30bf5 [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 () {
5 if [ -e ${IMAGE_ROOTFS}/etc/group ]; then
6 sed -i '/^\(ipmi\|web\|redfish\|priv-admin\):.*:.*:$/s/$/root/' ${IMAGE_ROOTFS}/etc/group
7 fi
8}
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)}'