mirror of
https://git.yoctoproject.org/poky
synced 2026-05-09 17:39:31 +00:00
xserver-nodm-init: add xuser to group audio
add rootless X user to group audio to access /dev/snd/* Fixes [YOCTO #799] CC: Ke Yu <ke.yu@intel.com> (From OE-Core rev: 4df75586c0f5447670fe945285c7ad01c5e1f37f) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -3,7 +3,7 @@ LICENSE = "GPLv2"
|
|||||||
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
|
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
|
||||||
SECTION = "x11"
|
SECTION = "x11"
|
||||||
PRIORITY = "optional"
|
PRIORITY = "optional"
|
||||||
PR = "r24"
|
PR = "r25"
|
||||||
RDEPENDS_${PN} = "dbus-wait sudo"
|
RDEPENDS_${PN} = "dbus-wait sudo"
|
||||||
|
|
||||||
SRC_URI = "file://xserver-nodm \
|
SRC_URI = "file://xserver-nodm \
|
||||||
@@ -30,12 +30,13 @@ pkg_postinst_${PN} () {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f /etc/X11/Xusername ]; then
|
if [ -f /etc/X11/Xusername ]; then
|
||||||
# create the rootless X user, and add user to group tty, video
|
# create the rootless X user, and add user to group tty, video, audio
|
||||||
username=`cat /etc/X11/Xusername`
|
username=`cat /etc/X11/Xusername`
|
||||||
adduser --disabled-password $username
|
adduser --disabled-password $username
|
||||||
# FIXME: use addgroup if busybox addgroup is ready
|
# FIXME: use addgroup if busybox addgroup is ready
|
||||||
sed -i -e "s/^video:.*/&${username}/g" /etc/group
|
sed -i -e "s/^video:.*/&${username}/g" /etc/group
|
||||||
sed -i -e "s/^tty:.*/&${username}/g" /etc/group
|
sed -i -e "s/^tty:.*/&${username}/g" /etc/group
|
||||||
|
sed -i -e "s/^audio:.*/&${username}/g" /etc/group
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user