Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 269063 - net-wireless/hostapd init script is not POSIX-compliant
Summary: net-wireless/hostapd init script is not POSIX-compliant
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High minor (vote)
Assignee: Mobile Herd (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-08 21:14 UTC by Davide Pesavento
Modified: 2009-05-17 10:18 UTC (History)
1 user (show)

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


Attachments
hostapd-initd.patch (hostapd-initd.patch,1.20 KB, patch)
2009-05-08 21:21 UTC, Davide Pesavento (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Davide Pesavento (RETIRED) gentoo-dev 2009-05-08 21:14:22 UTC
With baselayout-2 (OpenRC) all init scripts are required to be POSIX-compliant. The one from hostapd package contains a bashism and thus it may fail when /bin/sh is not bash (e.g. it fails on my system with dash).
Comment 1 Dawid Węgliński (RETIRED) gentoo-dev 2009-05-08 21:20:07 UTC
More info on how it fails is very appropriate.
Comment 2 Davide Pesavento (RETIRED) gentoo-dev 2009-05-08 21:21:19 UTC
Created attachment 190706 [details, diff]
hostapd-initd.patch

Fixes the bashism and also contains a small optimization in depend() when multiple interfaces are used.

The reload() action would be better written as follows:
start-stop-daemon --signal HUP /usr/sbin/hostapd
but I think this code isn't backward-compatible with baselayout-1, so this hasn't changed in the above patch.
Comment 3 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2009-05-17 10:18:52 UTC
Fixed in CVS, should hit the tree within 1-2 hours