Package: asterisk Version: 1:1.4.20~dfsg-1 Severity: minor If the asterisk postinst script is aborted before asterisk is added to the dialout and audio groups, subsequent runs of the script will not fix the problem. (See section 6.2 of the Debian Policy Manual.)
The attached patch just brings the group checks outside of the check that the user 'asterisk' exists. Currently they should always be true, because the user has only just been created. -- Tim Retout <[EMAIL PROTECTED]>
diff --git a/debian/asterisk.postinst b/debian/asterisk.postinst index c16d19b..8876913 100644 --- a/debian/asterisk.postinst +++ b/debian/asterisk.postinst @@ -13,7 +13,7 @@ set -e case "$1" in configure) - # add asterisk user and add it to dialout and audio groups + # add asterisk user if ! getent passwd asterisk > /dev/null ; then echo 'Adding system user for Asterisk' 1>&2 adduser --system --group --quiet \ @@ -21,13 +21,14 @@ case "$1" in --no-create-home --disabled-login \ --gecos "Asterisk PBX daemon" \ asterisk + fi - for group in dialout audio; do - if groups asterisk | grep -w -q -v $group; then - adduser asterisk $group - fi - done - fi + # add asterisk to required groups + for group in dialout audio; do + if groups asterisk | grep -w -q -v $group; then + adduser asterisk $group + fi + done # chown asterisk on all $dirs and their subdirectories # do not harm the files, they should be empty on new installations