]> git.ipfire.org Git - thirdparty/asterisk.git/commit
ast_coredumper: Fix issues with naming
authorGeorge Joseph <gjoseph@digium.com>
Fri, 28 Aug 2020 14:34:09 +0000 (08:34 -0600)
committerKevin Harwell <kharwell@digium.com>
Mon, 31 Aug 2020 22:16:35 +0000 (17:16 -0500)
commit2c09b2344439e0125985a74ea6b6b994eda89c2e
treef98bc023d19b882362b9b9f0510995883a45a105
parentcc60a0fb6fb9a28b5c30439b36f2af66b1f89d72
ast_coredumper: Fix issues with naming

If you run ast_coredumper --tarball-coredumps in the same directory
as the actual coredump, tar can fail because the link to the
actual coredump becomes recursive.  The resulting tarball will
have everything _except_ the coredump (which is usually what
you need)

There's also an issue that the directory name in the tarball
is the same as the coredump so if you extract the tarball the
directory it creates will overwrite the coredump.

So:

 * Made the link to the coredump use the absolute path to the
   file instead of a relative one.  This prevents the recursive
   link and allows tar to add the coredump.

 * The tarballed directory is now named <coredump>.output instead
   of just <coredump> so if you expand the tarball it won't
   overwrite the coredump.

Change-Id: I8b3eeb26e09a577c702ff966924bb0a2f9a759ea
contrib/scripts/ast_coredumper