Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'jb46368'
  • Loading branch information
jusa committed Jun 20, 2019
2 parents ef9880b + cdf2790 commit 6ea42ca
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions rpm/pulseaudio.spec
Expand Up @@ -149,15 +149,16 @@ install -m0644 README %{buildroot}%{_docdir}/%{name}-%{version}
%fdupes %{buildroot}/%{_includedir}

%pre
# system-wide mode needs an user and two groups
if ! getent passwd pulse > /dev/null ; then
useradd -rUG audio,bluetooth -d /run/pulse -s /sbin/nologin pulse || :
fi
if ! getent group pulse-access > /dev/null ; then
groupadd -rf pulse-access || :
usermod -G pulse-access -a root || :
usermod -G pulse-access -a nemo || :
getent group pulse-access >/dev/null || groupadd -r pulse-access
getent group pulse >/dev/null || groupadd -f -g 171 -r pulse
if ! getent passwd pulse >/dev/null ; then
if ! getent passwd 171 >/dev/null ; then
useradd -r -u 171 -g pulse -G audio -d %{_localstatedir}/run/pulse -s /sbin/nologin -c "PulseAudio System Daemon" pulse
else
useradd -r -g pulse -G audio -d %{_localstatedir}/run/pulse -s /sbin/nologin -c "PulseAudio System Daemon" pulse
fi
fi
usermod -G pulse-access -a root || :

%post -p /sbin/ldconfig

Expand Down

0 comments on commit 6ea42ca

Please sign in to comment.