Fixed a bug that could leave fstab unmodified on new installations.
This commit is contained in:
@@ -1461,10 +1461,10 @@ install_base_system() {
|
|||||||
|
|
||||||
# Generate or preserve fstab
|
# Generate or preserve fstab
|
||||||
if [[ "$useExistingMount" == true ]]; then
|
if [[ "$useExistingMount" == true ]]; then
|
||||||
if [[ -s "$mountPoint/etc/fstab" ]]; then
|
if grep -Eq '^[[:space:]]*[^#[:space:]]' "$mountPoint/etc/fstab" 2>/dev/null; then
|
||||||
log_info "Manual mount mode: preserving existing /etc/fstab"
|
log_info "Manual mount mode: preserving existing /etc/fstab"
|
||||||
else
|
else
|
||||||
log_warning "Manual mount mode: /etc/fstab not found, generating one"
|
log_warning "Manual mount mode: /etc/fstab has no filesystem entries, generating one"
|
||||||
genfstab -U "$mountPoint" > "$mountPoint/etc/fstab"
|
genfstab -U "$mountPoint" > "$mountPoint/etc/fstab"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user