mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-05 00:38:27 +08:00
48 lines
1.4 KiB
Plaintext
48 lines
1.4 KiB
Plaintext
|
post_install() {
|
||
|
if post_upgrade; then
|
||
|
cat << MES
|
||
|
>>> See the wiki at http://wiki.archlinux.org/index.php/PulseAudio for details
|
||
|
on configuring your system for PulseAudio.
|
||
|
|
||
|
>>> Make sure to install pulseaudio-alsa to configure ALSA for PulseAudio.
|
||
|
|
||
|
>>> You might want to blacklist the "snd-pcm-oss" module in /etc/rc.conf to
|
||
|
keep ALSA's OSS emulation from interfering with ALSA or PulseAudio.
|
||
|
MES
|
||
|
else
|
||
|
echo "PulseAudio post-install failed"
|
||
|
return 1
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
post_upgrade() {
|
||
|
# Delete old group
|
||
|
if getent group realtime &>/dev/null; then
|
||
|
usr/sbin/groupdel realtime || return 1
|
||
|
fi
|
||
|
|
||
|
# Add groups
|
||
|
getent group pulse &>/dev/null || usr/sbin/groupadd -g 130 pulse || return 1
|
||
|
getent group pulse-access &>/dev/null || usr/sbin/groupadd -g 131 pulse-access || return 1
|
||
|
getent group pulse-rt &>/dev/null || usr/sbin/groupadd -g 132 pulse-rt || return 1
|
||
|
|
||
|
# Add user
|
||
|
if ! getent passwd pulse &>/dev/null; then
|
||
|
usr/sbin/useradd -u 130 -d /var/run/pulse -g pulse -G audio -s /bin/false pulse || return 1
|
||
|
passwd -l pulse &>/dev/null || return 1
|
||
|
fi
|
||
|
|
||
|
chown pulse:pulse /var/pulse
|
||
|
}
|
||
|
|
||
|
post_remove() {
|
||
|
getent passwd pulse &>/dev/null && usr/sbin/userdel -f pulse
|
||
|
getent group pulse-access &>/dev/null && usr/sbin/groupdel pulse-access
|
||
|
getent group pulse-rt &>/dev/null && usr/sbin/groupdel pulse-rt
|
||
|
getent group pulse &>/dev/null && usr/sbin/groupdel pulse
|
||
|
|
||
|
true
|
||
|
}
|
||
|
|
||
|
# vim:set ts=2 sw=2 et:
|