Richard Marian Thomaiyar | a2a2087 | 2019-11-02 21:16:40 +0530 | [diff] [blame] | 1 | # |
| 2 | # This function is intended to add root to corresponding groups if 'debug-tweaks' or 'allow-root-login' is in IMAGE_FEATURES. |
| 3 | # |
| 4 | update_root_user_groups () { |
Patrick Williams | af48f63 | 2023-03-20 10:13:55 -0500 | [diff] [blame] | 5 | 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 Thomaiyar | a2a2087 | 2019-11-02 21:16:40 +0530 | [diff] [blame] | 8 | } |
| 9 | # Add root user to the needed groups |
| 10 | ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-root-login' ], "update_root_user_groups; ", "", d)}' |