Correct regex for disk size

Currently the regex negates any line starting with
any character in the word 'Filesystem', whereas the
intent is to negate the word 'Filesystem' instead.

Closes-Bug: #1724025
Change-Id: Ia40595e3a06a23494165a210e1dd3e72862eb311
This commit is contained in:
Jesse Pretorius 2017-10-25 10:45:29 +01:00
parent 1fe7d72139
commit 3ce37a347a

View File

@ -32,7 +32,7 @@
if [[ $(df -T / | tail -n 1 | awk '{print $2}') == "btrfs" ]]; then
btrfs fi usage --kbytes / | awk '/^.*Free / {print $3}'| sed 's/\..*//'
else
df -BK / | awk '/^[^Filesystem]/ {print $4}' | sed 's/K//'
df -BK / | awk '!/^Filesystem/ {print $4}' | sed 's/K//'
fi
when: bootstrap_host_data_disk_device == None
changed_when: false