mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2026-08-28 20:06:05 +00:00
fix: Do not match multiple files (#1211)
This commit is contained in:
@@ -567,6 +567,7 @@ addDisk () {
|
||||
USED=$(du -sB 1 "$DISK_FILE" | cut -f1)
|
||||
FREE=$(df --output=avail -B 1 "$DIR" | tail -n 1)
|
||||
LEFT=$(( CUR_SIZE - USED - FREE ))
|
||||
(( LEFT < 0 )) && LEFT=0
|
||||
|
||||
if (( LEFT > 0 )); then
|
||||
|
||||
|
||||
+5
-4
@@ -205,11 +205,12 @@ fi
|
||||
MSG="Preparing system partition..."
|
||||
info "Install: $MSG" && html "$MSG"
|
||||
|
||||
BOOT=$(find "$TMP" -name "*.bin.zip")
|
||||
[ ! -s "$BOOT" ] && error "The PAT file contains no boot image." && exit 67
|
||||
BOOT=$(find "$TMP" -name "*.bin.zip" -print -quit)
|
||||
[ -z "$BOOT" ] && error "The PAT file contains no boot image." && exit 67
|
||||
[ ! -s "$BOOT" ] && error "The PAT boot image archive is empty." && exit 67
|
||||
|
||||
BOOT=$(echo "$BOOT" | head -c -5)
|
||||
unzip -q -o "$BOOT".zip -d "$TMP"
|
||||
unzip -q -o "$BOOT" -d "$TMP"
|
||||
BOOT="${BOOT%.zip}"
|
||||
|
||||
SYSTEM="$STORAGE/$BASE.system.img"
|
||||
rm -f "$SYSTEM"
|
||||
|
||||
+1
-1
@@ -85,7 +85,7 @@ configureSerialPorts() {
|
||||
-chardev socket,id=charchannel0,host=127.0.0.1,port=$CHR_PORT,reconnect=10 \
|
||||
-device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=vchannel"
|
||||
|
||||
return 0
|
||||
return 0
|
||||
}
|
||||
|
||||
validateHostMac
|
||||
|
||||
Reference in New Issue
Block a user