[Asterisk-code-review] ast coredumper: Minor fixes (asterisk[13])
George Joseph
asteriskteam at digium.com
Fri Feb 23 15:00:31 CST 2018
George Joseph has uploaded this change for review. ( https://gerrit.asterisk.org/8385
Change subject: ast_coredumper: Minor fixes
......................................................................
ast_coredumper: Minor fixes
* Fix --tarball-config so the option doesn't cause an error.
* Allow for missing /etc/os-release.
* Add a sleep between tarballing the coredump and removing the
output directory to allow the filesystem to settle.
Change-Id: I73e03b13087978bcc7f6bc9f45753990f82d9d77
---
M contrib/scripts/ast_coredumper
1 file changed, 6 insertions(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/85/8385/1
diff --git a/contrib/scripts/ast_coredumper b/contrib/scripts/ast_coredumper
index 884ede7..38d95cc 100755
--- a/contrib/scripts/ast_coredumper
+++ b/contrib/scripts/ast_coredumper
@@ -216,6 +216,7 @@
RUNNING=false
latest=false
tarball_coredumps=false
+tarball_config=false
delete_coredumps_after=false
tarball_results=false
delete_results_after=false
@@ -280,6 +281,9 @@
;;
--tarball-coredumps)
tarball_coredumps=true
+ ;;
+ --tarball-config)
+ tarball_config=true
;;
--delete-coredumps-after)
delete_coredumps_after=true
@@ -436,7 +440,7 @@
ln -s ${cf} ${dest}/tmp/${cfname}
cp ${outputdir}/${cfname}*.txt ${dest}/tmp/
- cp /etc/os-release ${dest}/etc/
+ [ -f /etc/os-release ] && cp /etc/os-release ${dest}/etc/
if $tarball_config ; then
cp -a /etc/asterisk ${dest}/etc/
fi
@@ -445,6 +449,7 @@
cp -a /usr/sbin/asterisk ${dest}/usr/sbin
rm -rf ${tf}
tar -chzf ${tf} --transform="s/^[.]/${cfname}/" -C ${dest} .
+ sleep 3
rm -rf ${dest}
echo "Created $tf"
elif $tarball_results ; then
--
To view, visit https://gerrit.asterisk.org/8385
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: I73e03b13087978bcc7f6bc9f45753990f82d9d77
Gerrit-Change-Number: 8385
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180223/7d033272/attachment.html>
More information about the asterisk-code-review
mailing list