Fix networked kdump failure to reach remote server. Avoids "Network is unreachable" message when trying to do remote dumps on either SSH or NFS. (LP: #1571590)
The 'symlinks' command will verify if the symlinks correctly point
to the version provided as an argument. If not, it will recreate
new symlinks and, if needed, will build the smaller initrd.img if
this one is missing.
The functionality is a solution for situations where kdump-tools has
been installed on systems which have more than one kernel installed.
In those cases, only the current running kernel will have his smaller
initrd.img file created as the kernel hook will only run for the
current kernel.
With this functionality, if the smaller initrd.img is missing, the
'symlinks' command can be used to create it and apply the correct
symlink to it.
This can only be used if kdump is not already loaded otherwise it would
break the kdump mechanism.
Signed-off-by: Louis Bouchard <email address hidden>
We no longer discriminate on the type of link failure (broken/absent)
and force link re-creation systematically.
check_symlink() is also enhanced to take the kernel version as an
argument. It also check to see if the link points to the proper kernel
version and will create a new symlink if the version differs.
Signed-off-by: Louis Bouchard <email address hidden>