Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 944145 - media-sound/mpd: init script fails to start
Summary: media-sound/mpd: init script fails to start
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Adrian Schollmeyer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-20 13:55 UTC by Sandu Adrian
Modified: 2024-11-21 09:30 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sandu Adrian 2024-11-20 13:55:51 UTC
Having this /etc/mpd.conf :

user "mpd"
group "audio"
#....
audio_output {
#....
        user            "mpd"
#....
}
#....

I tracked it down to the sed line in the get_config function

$ sed -n -e '/^[ \t]*'user'/{s:^[ \t]*'user'[ \t]\+"\?\([^#"]\+\)[^"]*"\?$:\1: ; p }' /etc/mpd.conf
mpd
mpd

the get_config() function for user used by the init script returns mpd twice (each on a new line) which in turn results in a failure for the checkpath

Currently as a workaround I moved that section to a different file and used an include in the /etc/mpd.conf file.
Comment 1 Nicolas PARLANT 2024-11-21 09:30:05 UTC
"{p;q}" instead of "p" to match the first line ?

sed -n -e '/^[ \t]*'user'/{s:^[ \t]*'user'[ \t]\+"\?\([^#"]\+\)[^"]*"\?$:\1: ; {p;q} }' /etc/mpd.conf