Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 204729 - net-proxy/polipo-1.0.3: init script not compatible with POSIX shells
Summary: net-proxy/polipo-1.0.3: init script not compatible with POSIX shells
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Network Proxy Developers (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-07 09:44 UTC by Fabrizio Montesi
Modified: 2008-01-07 20:17 UTC (History)
0 users

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


Attachments
Fix patch. (polipoinit.diff,1.11 KB, patch)
2008-01-07 09:48 UTC, Fabrizio Montesi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabrizio Montesi 2008-01-07 09:44:43 UTC
After symlinking /bin/dash to /bin/sh, the init script of polipo stopped working. The reason for this are two bash-isms, specifically the use of [[ ]] expression evaluation and the PIPESTATUS built-in variable.

I'm attaching a fix for this. The changes are in the checkconfig() function.
There is also a little optimization since the script does not use (list) sub-shell execution at all.

Thanks to Diego "Flameeyes" Pettenò for his advices.

Reproducible: Always

Steps to Reproduce:
1. ln -sf /bin/dash /bin/sh
2. /etc/init.d/polipo start
Actual Results:  
The scripts does not get executed due to error messages regarding the [[ ]] expression evaluation and the PIPESTATUS variable.

Expected Results:  
Starting polipo.
Comment 1 Fabrizio Montesi 2008-01-07 09:48:13 UTC
Created attachment 140360 [details, diff]
Fix patch.
Comment 2 Alin Năstac (RETIRED) gentoo-dev 2008-01-07 20:17:46 UTC
Fixed in cvs without revision bump. Thanks!