Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 412237 - =sys-apps/openrc-0.9.9.3 /etc/init.d/procfs: '[: 308: unexpected operator' (/bin/sh -> dash)
Summary: =sys-apps/openrc-0.9.9.3 /etc/init.d/procfs: '[: 308: unexpected operator' (/...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: openrc-0.10
  Show dependency tree
 
Reported: 2012-04-16 17:29 UTC by Sergei Trofimovich (RETIRED)
Modified: 2012-04-16 18:52 UTC (History)
0 users

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


Attachments
0001-init.d-procfs-work-nicer-in-dash.patch (0001-init.d-procfs-work-nicer-in-dash.patch,1.00 KB, patch)
2012-04-16 17:29 UTC, Sergei Trofimovich (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.