Skip to content

Commit e009ffe

Browse files
loolgagath
authored andcommitted
fix(debos/rootfs): Only use fastrpc group when present
The fastrpc group is created by fastrpc-support which is only installed on Debian. Check for the group with getent before adding it to the useradd --groups list to avoid failures on Ubuntu. Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com> Signed-off-by: Agathe Porte <agathe.porte@oss.qualcomm.com>
1 parent 17d32e4 commit e009ffe

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

debos-recipes/qualcomm-linux-debian-rootfs.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,13 @@ actions:
230230
# some useful groups for desktop scenarios, but also to run payloads
231231
# from the serial console, over SSH, or in containers - where the desktop
232232
# session has not updated ACLs to the device nodes
233+
groups="adm,audio,render,sudo,users,video"
234+
# fastrpc group only exists when fastrpc-support is installed (Debian)
235+
if getent group fastrpc >/dev/null 2>&1; then
236+
groups="${groups},fastrpc"
237+
fi
233238
useradd --create-home --shell /bin/bash --user-group \
234-
--groups adm,audio,fastrpc,render,sudo,users,video debian
239+
--groups "$groups" debian
235240
# set password to "debian"
236241
echo debian:debian | chpasswd
237242
# password must be changed on first login

0 commit comments

Comments
 (0)