Skip to content

Commit

Permalink
S14postupgrade: add lowercase os_version compatiblity
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrisan committed Apr 12, 2019
1 parent d0e9221 commit 40d40b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion board/common/overlay/etc/init.d/S14postupgrade
Expand Up @@ -23,7 +23,10 @@ function version_gt() {
}

function run_post_upgrade() {
version="$(source ${VERSION_FILE} 2>/dev/null && echo ${OS_VERSION})"
unset OS_VERSION
# ensure compatibility with previous lowercase os_version
version="$(source ${VERSION_FILE} 2>/dev/null && echo ${OS_VERSION}${os_version})"

sys_version="$(source ${SYS_VERSION_FILE} 2>/dev/null && echo ${OS_VERSION})"

versions=$(ls -1 ${POST_UPGRADE_DIR} | cut -d '.' -f 1)
Expand Down
4 changes: 4 additions & 0 deletions board/common/overlay/usr/share/post-upgrade/20190127.sh
Expand Up @@ -5,6 +5,10 @@
function to_uppercase() {
IFS='='
while read line; do
if [[ -z "${line}" ]]; then
echo
continue
fi
parts=(${line})
echo $(tr 'a-z' 'A-Z' <<< ${parts[0]})=${parts[1]}
done
Expand Down

0 comments on commit 40d40b6

Please sign in to comment.