I found this problem when debugging "Transaction is destructive"
(see the following patch) issue using nfs, in the case that nfs
is mounted implicitly to the save path other than explicitly
using the "nfs" directive in /etc/kdump.conf, "is_nfs_dump_target"
will return false, so this nfs mount will be added "x-initrd.mount"
option wrongly.
It affects the systemd service behaviours when emergency failure
happens as the code comment described.
To fix it, we use "is_fs_type_nfs $_fstype" instead.
Signed-off-by: Xunlei Pang <xlpang(a)redhat.com>
---
mkdumprd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mkdumprd b/mkdumprd
index f30d9c2..f1bac01 100644
--- a/mkdumprd
+++ b/mkdumprd
@@ -120,7 +120,7 @@ to_mount() {
# If remote mount fails, dracut-initqueue will still start and once
# dracut-initqueue finishes, kdump service will start. Because remote mount
# failed, kdump service will fail and it will lead to kdump error handler.
- if ! is_nfs_dump_target; then
+ if ! is_fs_type_nfs $_fstype; then
_options="$_options,x-initrd.mount"
fi
_mntopts="$_target $_fstype $_options"
--
1.8.3.1