kvmd-armbian
kvmd-armbian copied to clipboard
invalid tar command in install.sh
https://github.com/srepac/kvmd-armbian/blob/c16d85733f03268742ed05d1bc667fd7ef35845a/install.sh#L407-L413
on my system with platform="kvmd-platform-v2-hdmiusb-rpi4" line 408 matches two results so $i contains multiple file names
when this is fed into the tar command in 413, it throws an error as multiple file names in tar is invalid. this causes incomplete installation and other parts of the script to fail as well, (ie: udev sed command, etc)
@a-chaudhari this helped me. give it a try
# uncompress platform package first
i=$(ls -t ${KVMDCACHE}/${platform}*.tar.xz | head -n 1) ### install the most up to date kvmd-platform package
if [[ -z "$i" ]]; then
echo "ERROR: No platform package found matching ${platform} in ${KVMDCACHE}." | tee -a $INSTLOG
exit 1 # Or handle the error as appropriate for your script.
fi
# change the log entry to show 3.291 platform installed as we'll be forcing kvmd-3.291 instead of latest/greatest kvmd
_platformver=$( echo $i | sed -e 's/3\.29[2-9]*/3.291/g' -e 's/3\.3[0-9]*/3.291/g' -e 's/3.2911/3.291/g' -e 's/4\.[0-9].*-/3.291-/g' )
echo "-> Extracting package $_platformver into /" | tee -a $INSTLOG
tar xfJ "$i"
Updated the installer with this change.