Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 447888 Details for
Bug 594964
net-misc/asterisk-* init script improvements.
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
diff showing the changes made for review
asterisk.init.diff (text/plain), 2.79 KB, created by
Jaco Kroon
on 2016-09-25 20:08:43 UTC
(
hide
)
Description:
diff showing the changes made for review
Filename:
MIME Type:
Creator:
Jaco Kroon
Created:
2016-09-25 20:08:43 UTC
Size:
2.79 KB
patch
obsolete
>--- asterisk.orig 2016-09-25 21:48:47.000000000 +0200 >+++ asterisk 2016-09-25 22:05:03.000000000 +0200 >@@ -53,14 +53,19 @@ > > if [ -n "${ASTERISK_USER}" ]; then > ast_user="${ASTERISK_USER%%:*}" >- ast_group="${ASTERISK_USER#*:}" >- ast_group="${ast_group%%:*}" >+ if [[ "${ASTERISK_USER}" = *:* ]]; then >+ ast_group="${ASTERISK_USER#*:}" >+ ast_group="${ast_group%%:*}" >+ else >+ ast_group="" >+ fi >+ > [ -z "${ast_user}" ] && ast_user=root >- [ -z "${ast_group}" ] && ast_group="$(getent group $(getent passwd "${ast_user}" | awk -F: '{ print $4 }') | sed -re 's/:.*//')" >+ [ -n "${ast_group}" ] && ast_prim_group="${ast_group}" || ast_prim_group="$(getent group $(getent passwd "${ast_user}" | awk -F: '{ print $4 }') | sed -re 's/:.*//')" > fi > > [ -z "${ast_user}" ] && ast_user=root >- [ -z "${ast_group}" ] && ast_group=root >+ [ -z "${ast_prim_group}" ] && ast_prim_group=root > > return 0 > } >@@ -69,7 +74,7 @@ > setup_svc_variables > > local path >- checkpath -d -m 0755 -o ${ast_user}:${ast_group} "${ast_logdir}" "${ast_rundir}" "${ast_spooldir}" >+ checkpath -d -m 0755 -o ${ast_user}:${ast_prim_group} "${ast_logdir}" "${ast_rundir}" "${ast_spooldir}" > for path in "${ast_rundir}" "${ast_spooldir}" "${ast_logdir}"; do > ebegin "Checking ${path}" > find "${path}" ! -user "${ast_user}" | while read element; do >@@ -186,7 +191,7 @@ > if [ -n "${ASTERISK_CORE_DIR}" ] && \ > [ ! -d "${ASTERISK_CORE_DIR}" ] > then >- checkpath -d -m 0755 -o ${ast_user}:${ast_group} "${ASTERISK_CORE_DIR}" >+ checkpath -d -m 0755 -o ${ast_user}:${ast_prim_group} "${ASTERISK_CORE_DIR}" > fi > ASTERISK_CORE_DIR="${ASTERISK_CORE_DIR:-/tmp}" > >@@ -248,20 +253,20 @@ > fi > OPTS="${OPTS} -U ${ast_user}" > >- if ! getent group "${ast_group}" &>/dev/null; then >- eerror "Requested to run asterisk with group ${ast_group}, which doesn't exist." >+ if ! getent group "${ast_prim_group}" &>/dev/null; then >+ eerror "Requested to run asterisk with group ${ast_prim_group}, which doesn't exist." > return 1 > fi >- OPTS="${OPTS} -G ${ast_group}" >+ [ -n "${ast_group}" ] && OPTS="${OPTS} -G ${ast_group}" > > if [ "${ast_user}" = root ]; then > ewarn "Starting asterisk as root is not recommended (SERIOUS SECURITY CONSIDERATIONS)." >- elif [ "${ast_group}" = root ]; then >+ elif [ "${ast_prim_group}" = root ]; then > ewarn "Starting asterisk with group root is not recommended (SERIOUS SECURITY CONSIDERATIONS)." > fi > >- checkpath -d -m 0755 -o "${ast_user}:${ast_group}" "${ast_logdir}" "${ast_rundir}" >- einfo "Starting asterisk as : ${ast_user}:${ast_group}" >+ checkpath -d -m 0755 -o "${ast_user}:${ast_prim_group}" "${ast_logdir}" "${ast_rundir}" >+ einfo "Starting asterisk as : ${ast_user}:${ast_group:-${ast_prim_group} (+supplementaries)}" > asterisk_run_loop ${OPTS} 2>&1 | logger -t "wrapper:${ast_instancename}" & > result=$? >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 594964
:
447886
|
447888
|
504458
|
504460