divingbell/divingbell/templates/bin
Matt Carter 4c6ac4712d Update uamlite.sh to handle empty user_sshkeys arrays
Previously _uamlite.sh.tpl would fail to render if any user data
had an empty user_sshkeys array. This is because the template would
check to see if the key existed, but not actually make sure that the
array contained within that key had any elements. "first" would be
called against the empty array, which would return nil, and then
the outer eq function call would fail (as it can't be used to
compare nil values).

This patch set adds a default statement after the "first" function,
so that if the array is empty and first returns nil, a default of
"Unmanaged" will be returned, which will end up making the eq
statement evaluate to false, and the code inside the if statement to
not be run.

Change-Id: I52713795284cd1d0961bd430858061f9df9c5f78
2019-06-25 15:16:31 -05:00
..
_apparmor.sh.tpl Use common logger for consistent log output 2019-04-11 13:23:05 -07:00
_apt.sh.tpl Merge "Use common logger for consistent log output" 2019-04-24 18:24:35 +00:00
_ethtool.sh.tpl Use common logger for consistent log output 2019-04-11 13:23:05 -07:00
_exec.sh.tpl Use common logger for consistent log output 2019-04-11 13:23:05 -07:00
_limits.sh.tpl Use common logger for consistent log output 2019-04-11 13:23:05 -07:00
_mounts.sh.tpl Use common logger for consistent log output 2019-04-11 13:23:05 -07:00
_perm.sh.tpl Use common logger for consistent log output 2019-04-11 13:23:05 -07:00
_shcommon.tpl Adding timestamp to _shcommon as log formatter for 2019-01-16 07:43:22 -05:00
_sysctl.sh.tpl Use common logger for consistent log output 2019-04-11 13:23:05 -07:00
_uamlite.sh.tpl Update uamlite.sh to handle empty user_sshkeys arrays 2019-06-25 15:16:31 -05:00