diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/rootfs-postcommands.bbclass | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass index db8b551533..b38b6a50c5 100644 --- a/meta/classes/rootfs-postcommands.bbclass +++ b/meta/classes/rootfs-postcommands.bbclass | |||
@@ -45,6 +45,15 @@ systemd_create_users () { | |||
45 | [ "$id" != "-" ] && groupadd_params="$groupadd_params --gid $id" | 45 | [ "$id" != "-" ] && groupadd_params="$groupadd_params --gid $id" |
46 | groupadd_params="$groupadd_params --system $name" | 46 | groupadd_params="$groupadd_params --system $name" |
47 | eval groupadd --root ${IMAGE_ROOTFS} $groupadd_params || true | 47 | eval groupadd --root ${IMAGE_ROOTFS} $groupadd_params || true |
48 | elif [ "$type" = "m" ]; then | ||
49 | group=$id | ||
50 | if [ ! `grep -q "^${group}:" ${IMAGE_ROOTFS}${sysconfdir}/group` ]; then | ||
51 | eval groupadd --root ${IMAGE_ROOTFS} --system $group | ||
52 | fi | ||
53 | if [ ! `grep -q "^${name}:" ${IMAGE_ROOTFS}${sysconfdir}/passwd` ]; then | ||
54 | eval useradd --root ${IMAGE_ROOTFS} --shell /sbin/nologin --system $name | ||
55 | fi | ||
56 | eval usermod --root ${IMAGE_ROOTFS} -a -G $group $name | ||
48 | fi | 57 | fi |
49 | done | 58 | done |
50 | done | 59 | done |