juju-introspection.sh is full of bashisms
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
Medium
|
Tim Penhey | ||
2.3 |
Fix Released
|
Medium
|
Tim Penhey | ||
2.4 |
Fix Released
|
Medium
|
Tim Penhey |
Bug Description
On a model deployed with Juju 2.2.8, backed by the OpenStack provider.
The application in question is a web app, which runs as an unprivileged user, where interactive shell usage is not normally required. As such the entry in /etc/passwd (passwd(5)) has no command interpreter set; in turn defaulting to /bin/sh which is a symlink to /bin/dash on Ubuntu.
$ juju ssh my-application/0
ubuntu@
-sh: 31: /etc/profile.
$
This is because Juju places bashisms in /etc/profile.
---
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
---
This can be reproduced by simply adding a user with a shell set to dash
ubuntu@
ubuntu@
Or the file could be made sh(1) compatible; the problem is with hyphens in function names.
tags: | added: canonical-is |
Changed in juju: | |
assignee: | nobody → Tim Penhey (thumper) |
status: | Triaged → In Progress |
milestone: | none → 2.5-beta1 |
Changed in juju: | |
status: | In Progress → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
We could just use underscores instead of hyphens in the names.