cloud-init profile.d files use bash-specific builtin "local"

Bug #1784713 reported by Merlie Allen on 2018-07-31
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Scott Moser
cloud-init (Ubuntu)

Bug Description

/etc/profile, which is read by the Bourne-like shells (including ksh),
runs the scripts in /etc/profile.d. The scripts from the cloud-init
package and
use the bash-builtin "local" which is not recognized by ksh resulting
in these errors at login:

/etc/profile[23]: .[141]: local: not found [No such file or directory]
/etc/profile[23]: .[142]: local: not found [No such file or directory]
/etc/profile[23]: .[143]: local: not found [No such file or directory]
/etc/profile[23]: .[178]: local: not found [No such file or directory]
/etc/profile[23]: .[179]: local: not found [No such file or directory]

$ grep -n local\ Z99* local warning="" idir="/var/lib/cloud/instance" n=0 local warndir="$idir/warnings" local ufile="$HOME/.cloud-warnings.skip" sfile="$warndir/.skip" local bad_names="" bad_lcs="" key="" val="" var="" vars="" bad_kv="" local w1 w2 w3 w4 remain local bad invalid="" to_gen="" sfile="/usr/share/i18n/SUPPORTED" local pkgs="" local pkgs=""

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: cloud-init 18.2-27-g6ef92c98-0ubuntu1~18.04.1
ProcVersionSignature: Ubuntu 4.15.0-29.31-generic 4.15.18
Uname: Linux 4.15.0-29-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.2
Architecture: amd64
CloudName: Other
Date: Tue Jul 31 20:04:30 2018
PackageArchitecture: all
 PATH=(custom, no user)
SourcePackage: cloud-init
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Merlie Allen (merlieallen) wrote :
description: updated
Scott Moser (smoser) on 2018-07-31
Changed in cloud-init (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Scott Moser (smoser) wrote :

Can you test if this works?

Scott Moser (smoser) wrote :

could you please test the attached merge proposal and report if it works?

This bug is fixed with commit 538af8e6 to cloud-init on branch master.
To view that commit see the following URL:

Scott Moser (smoser) on 2018-08-06
Changed in cloud-init:
assignee: nobody → Scott Moser (smoser)
importance: Undecided → Low
status: New → Fix Committed
Scott Moser (smoser) on 2018-09-14
Changed in cloud-init (Ubuntu):
status: Confirmed → Fix Released

This bug is believed to be fixed in cloud-init in version 18.4. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in cloud-init:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers