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

Bug 412237

Summary: =sys-apps/openrc-0.9.9.3 /etc/init.d/procfs: '[: 308: unexpected operator' (/bin/sh -> dash)
Product: Gentoo Hosted Projects Reporter: Sergei Trofimovich (RETIRED) <slyfox>
Component: OpenRCAssignee: OpenRC Team <openrc>
Status: RESOLVED FIXED    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 405503    
Attachments: 0001-init.d-procfs-work-nicer-in-dash.patch

Description Sergei Trofimovich (RETIRED) gentoo-dev 2012-04-16 17:29:21 UTC
Created attachment 309157 [details, diff]
0001-init.d-procfs-work-nicer-in-dash.patch

I've noticed in at boot:
    # /etc/init.d/procfs restart
    procfs         | * WARNING: you are stopping a boot service
    procfs         |[: 308: unexpected operator

Which calls
    $ /bin/dash -c '[ "$RC_SYS" == "OPENVZ" ] && echo "ovz" || echo "nope"'
    [: 1: unexpected operator
    nope

Fixed by using '='.

Thanks!
Comment 1 William Hubbs gentoo-dev 2012-04-16 18:52:28 UTC
This has been applied in commit 4943ddc
Thanks for the patch.