Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 269063

Summary: net-wireless/hostapd init script is not POSIX-compliant
Product: Gentoo Linux Reporter: Davide Pesavento (RETIRED) <pesa>
Component: Current packagesAssignee: Mobile Herd (OBSOLETE) <mobile+disabled>
Status: RESOLVED FIXED    
Severity: minor CC: gurligebis
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: hostapd-initd.patch

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