Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 582018 - app-emulation/lxc bashism: "type -p lxc-start"
Summary: app-emulation/lxc bashism: "type -p lxc-start"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Diego Elio Pettenò (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-03 21:05 UTC by Alexander Zubkov
Modified: 2016-05-19 04:28 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Zubkov 2016-05-03 21:05:42 UTC
/etc/inid.d/lxc script use such start line:

env -i ${setarch} $(type -p lxc-start) -l WARN -n ${CONTAINER} -f ${CONFIGFILE} -d -o /var/log/lxc/${CONTAINER}.log

"type -p lxc-start" - is bash-specific, which will fail with /bin/sh pointed to shell other than bash.

Execution in bash:

# type -p lxc-start
/usr/sbin/lxc-start

Execution in dash:

# type -p lxc-start
-p: not found
lxc-start is /usr/sbin/lxc-start

"-p: not found" - will be in output and starting /etc/init.d/lxc.something will result in error that linux64 have no option "-p".
Comment 1 Erik Mackdanz gentoo-dev 2016-05-19 04:28:51 UTC
Replaced with a 'which' in the 2.0.1 ebuild.