$ apt list --installed 2>&1 | grep -E '^(cloud-init|ksh)/'
cloud-init/focal-updates,now 21.2-3-g899bfaa9-0ubuntu2~20.04.1 all [installed]
ksh/focal,now 2020.0.0-5 amd64 [installed]
$ echo $SHELL
/bin/ksh
$ . /etc/profile.d/Z99-cloud-locale-test.sh
-ksh: .[14]: local: local can only be used in a function
$ . /etc/profile.d/Z99-cloudinit-warnings.sh
-ksh: .[7]: local: local can only be used in a function
$
These produce warnings, although with slightly different sources named, when run by ksh via /etc/profile at login on 20.04.3 LTS.
$ apt list --installed 2>&1 | grep -E '^(cloud- init|ksh) /' focal-updates, now 21.2-3- g899bfaa9- 0ubuntu2~ 20.04.1 all [installed] d/Z99-cloud- locale- test.sh d/Z99-cloudinit -warnings. sh
cloud-init/
ksh/focal,now 2020.0.0-5 amd64 [installed]
$ echo $SHELL
/bin/ksh
$ . /etc/profile.
-ksh: .[14]: local: local can only be used in a function
$ . /etc/profile.
-ksh: .[7]: local: local can only be used in a function
$
These produce warnings, although with slightly different sources named, when run by ksh via /etc/profile at login on 20.04.3 LTS.