From 61d4fa72b57433f3fc2509c9e1a25e4ac7a2c6f7 Mon Sep 17 00:00:00 2001 From: Kairui Song Date: Wed, 24 Jun 2020 12:11:47 +0800 Subject: [PATCH] mkdumprd: Improve the error message for umounted dump target Since commit ca01cbd, mkdumprd can generate the initramfs even if dump target is not mounted. But it will refuse to work if the dump target is not marked as noauto, and not mounted. If a target is not marked as noauto in fstab, it should be mounted automatically on boot. If it's not mounted, most likely something is wrong and user should fix that. So mkdumprd will just show an error message and quit to avoid further failure. This commit make the error message more clear and less confusing. Signed-off-by: Kairui Song Acked-by: Dave Young --- mkdumprd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdumprd b/mkdumprd index bf816fc..91ce3d5 100644 --- a/mkdumprd +++ b/mkdumprd @@ -222,7 +222,7 @@ check_user_configured_target() [ $? -ne 0 ] && perror_exit "Failed to mount $_target on $_mnt for kdump preflight check." _mounted=$_mnt else - perror_exit "$_target is configured in fstab but not mounted, please check its usability." + perror_exit "Dump target \"$_target\" is neither mounted nor configured as \"noauto\"" fi fi else