Skip to content
Snippets Groups Projects
Verified Commit 4d22ce09 authored by Sheogorath's avatar Sheogorath :european_castle:
Browse files

fix(system-upgrade): Fix ever expanding fstab line

This patch fixes a bug, where the longhorn fstab entry grows
indefinitely every time the lvm setup script is run. This is due to a
bug in the sed script that replaces only the first part of the fstab
entry instead of the entire line.
parent 68213704
Branches
Tags
No related merge requests found
......@@ -60,7 +60,7 @@ stringData:
if ! grep '/var/lib/longhorn' /etc/fstab; then
echo "/dev/mapper/${VG_NAME}-${LV_NAME} /var/lib/longhorn xfs defaults,x-systemd.device-timeout=0 0 0" >> /etc/fstab
else
sed -i "s%/dev/mapper/${VG_NAME}-${LV_NAME}*%/dev/mapper/${VG_NAME}-${LV_NAME} /var/lib/longhorn xfs defaults,x-systemd.device-timeout=0 0 0%" /etc/fstab
sed -i "s%^/dev/mapper/${VG_NAME}-${LV_NAME}.*%/dev/mapper/${VG_NAME}-${LV_NAME} /var/lib/longhorn xfs defaults,x-systemd.device-timeout=0 0 0%" /etc/fstab
fi
systemctl daemon-reload
---
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment