Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 789647 Details for
Bug 848474
media-video/mjpg-streamer-0_pre20200524-r1 installs shell script that uses non-POSIX features
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-media-video-mjpg-streamer-Avoid-non-POSIX-features-i.patch
0001-media-video-mjpg-streamer-Avoid-non-POSIX-features-i.patch (text/plain), 2.41 KB, created by
kfm
on 2022-07-02 18:06:21 UTC
(
hide
)
Description:
0001-media-video-mjpg-streamer-Avoid-non-POSIX-features-i.patch
Filename:
MIME Type:
Creator:
kfm
Created:
2022-07-02 18:06:21 UTC
Size:
2.41 KB
patch
obsolete
>From 61f0580fcac6652100e23a75a0b44e63aae57bca Mon Sep 17 00:00:00 2001 >From: Kerin Millar <kfm@plushkava.net> >Date: Fri, 1 Jul 2022 21:01:32 +0100 >Subject: [PATCH 1/4] media-video/mjpg-streamer: Avoid non-POSIX features in > runscript > >Use [ rather than [[ (SC3010). Don't use += (SC3024). Don't use string >replacing forms of parameter expansion (SC3060); instead use tr(1). > >Closes: https://bugs.gentoo.org/848474 >Signed-off-by: Kerin Millar <kfm@plushkava.net> >--- > .../mjpg-streamer/files/mjpg-streamer.initd | 21 +++++++++---------- > 1 file changed, 10 insertions(+), 11 deletions(-) > >diff --git a/media-video/mjpg-streamer/files/mjpg-streamer.initd b/media-video/mjpg-streamer/files/mjpg-streamer.initd >index e7116dba0..3b307e777 100644 >--- a/media-video/mjpg-streamer/files/mjpg-streamer.initd >+++ b/media-video/mjpg-streamer/files/mjpg-streamer.initd >@@ -3,7 +3,7 @@ > # Distributed under the terms of the GNU General Public License v2 > > MJPG_STREAMER_PIDFILE="${MJPG_STREAMER_PIDFILE:-/var/run/${SVCNAME}.pid}" >-MY_NAME=${SVCNAME//-/_} >+MY_NAME=$(printf %s "${SVCNAME}" | tr - _) > > depend() { > use logger >@@ -11,17 +11,16 @@ depend() { > } > > checkconfig() { >- local vars >+ set -- > >- [[ ${INPUT_PLUGIN} ]] || vars+=\ INPUT_PLUGIN >- [[ ${OUTPUT_PLUGIN} ]] || vars+=\ OUTPUT_PLUGIN >- [[ ${MJPG_STREAMER_USER} ]] || vars+=\ MJPG_STREAMER_USER >- [[ ${MJPG_STREAMER_GROUP} ]] || vars+=\ MJPG_STREAMER_GROUP >- vars="${vars# }" >+ [ "${INPUT_PLUGIN}" ] || set -- "$@" INPUT_PLUGIN >+ [ "${OUTPUT_PLUGIN}" ] || set -- "$@" OUTPUT_PLUGIN >+ [ "${MJPG_STREAMER_USER}" ] || set -- "$@" MJPG_STREAMER_USER >+ [ "${MJPG_STREAMER_GROUP}" ] || set -- "$@" MJPG_STREAMER_GROUP > >- if [[ ${vars} ]]; then >+ if [ $# -gt 0 ]; then > eerror "Required variables in /etc/conf.d/${SVCNAME} are not set:" >- eerror " ${vars// /, }" >+ eerror " $(IFS=,; printf %s "$*")" > return 1 > fi > >@@ -31,7 +30,7 @@ checkconfig() { > start() { > checkconfig || return $? > ebegin "Starting ${SVCNAME}" >- start-stop-daemon --start --exec /usr/bin/${MY_NAME} \ >+ start-stop-daemon --start --exec "/usr/bin/${MY_NAME}" \ > --user "${MJPG_STREAMER_USER}" \ > --group "${MJPG_STREAMER_GROUP}" -w 100 -b -m \ > --pidfile "${MJPG_STREAMER_PIDFILE}" \ >@@ -42,7 +41,7 @@ start() { > > stop() { > ebegin "Stopping ${SVCNAME}" >- start-stop-daemon --stop --exec /usr/bin/${MY_NAME} \ >+ start-stop-daemon --stop --exec "/usr/bin/${MY_NAME}" \ > --pidfile "${MJPG_STREAMER_PIDFILE}" > eend $? > } >-- >2.37.0 >
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 848474
:
781403
| 789647