Maffsie / openwrt-munin-node

openwrt-oriented munin-node implementation inspired by muninlite
BSD 3-Clause "New" or "Revised" License
11 stars 3 forks source link

xinetd adds \r (carriage return) #1

Closed madeddie closed 8 years ago

madeddie commented 8 years ago

Hi,

On my openwrt install the setup you describe with xinetd doesn't work. xinetd seems to add (or not correctly convert/strip) the carriage return, causing the case statement to fail.

I added these as first lines in the while statement to filter the \r (and any other added whitespace):

    cmd=${cmd%[-[:space:]]}
    mod=${mod%[-[:space:]]}
Maffsie commented 8 years ago

I've pushed a commit adding your fix, I'll test this more thoroughly over the weekend. Thanks for letting me know! :)