The crash dump is saved in the /sysroot/crash directory, not the
/sysroot/var/crash in the atomic system.
We will find the mount point by the command "df", if the directory is
mounted. But it is different between atomic system. "df /var/crash"
shows the "/var" is a mounted directory, but the "/var" is not a
mounted
directory, for "df" command.
So add the filter to satisfy the mounted directory, that the mount point
will appear both "df" and "df $dir".
Signed-off-by: Minfei Huang <mhuang(a)redhat.com>
---
dracut-module-setup.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
index ff7a088..b23de97 100755
--- a/dracut-module-setup.sh
+++ b/dracut-module-setup.sh
@@ -318,7 +318,10 @@ default_dump_target_install_conf()
_mntpoint=$(get_mntpoint_from_path $_save_path)
_target=$(get_target_from_path $_save_path)
- if [ "$_mntpoint" != "/" ]; then
+ # if the mount directory does not appear by the df command,
+ # the directory is not a mount directory,
+ # although the _mntpoint is "/", specified to the Atomic
+ if [ "$_mntpoint" != "/" ] && [ `df | grep
"$_mntpoint" -q` ]; then
_fstype=$(get_fs_type_from_target $_target)
if $(is_fs_type_nfs $_fstype); then
--
1.9.3
Show replies by date