fstab-sys: mount it in initramfs instead of newroot if mount point is not found
fstab-sys now also handles device passed by dracut argument "--mount" The "--mount" mount point is possible not exist in $NEWROOT. Thus mount it in initramfs if mount point is not exist in real rootfsmaster
parent
a75c3afe68
commit
a996d703e9
|
@ -20,7 +20,12 @@ fstab_mount() {
|
||||||
fi
|
fi
|
||||||
_fs=$(det_fs "$_dev" "$_fs")
|
_fs=$(det_fs "$_dev" "$_fs")
|
||||||
info "Mounting $_dev"
|
info "Mounting $_dev"
|
||||||
mount -v -t $_fs -o $_opts $_dev $NEWROOT/$_mp 2>&1 | vinfo
|
if [[ -d $NEWROOT/$_mp ]]; then
|
||||||
|
mount -v -t $_fs -o $_opts $_dev $NEWROOT/$_mp 2>&1 | vinfo
|
||||||
|
else
|
||||||
|
mkdir -p "$_mp"
|
||||||
|
mount -v -t $_fs -o $_opts $_dev $_mp 2>&1 | vinfo
|
||||||
|
fi
|
||||||
done < $1
|
done < $1
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue