Skip to content
Snippets Groups Projects
Commit 7e2128c8 authored by George Joseph's avatar George Joseph
Browse files

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
parent d6d520a0
No related branches found
No related tags found
No related merge requests found
...@@ -216,6 +216,7 @@ running=false ...@@ -216,6 +216,7 @@ running=false
RUNNING=false RUNNING=false
latest=false latest=false
tarball_coredumps=false tarball_coredumps=false
tarball_config=false
delete_coredumps_after=false delete_coredumps_after=false
tarball_results=false tarball_results=false
delete_results_after=false delete_results_after=false
...@@ -281,6 +282,9 @@ for a in "$@" ; do ...@@ -281,6 +282,9 @@ for a in "$@" ; do
--tarball-coredumps) --tarball-coredumps)
tarball_coredumps=true tarball_coredumps=true
;; ;;
--tarball-config)
tarball_config=true
;;
--delete-coredumps-after) --delete-coredumps-after)
delete_coredumps_after=true delete_coredumps_after=true
;; ;;
...@@ -436,7 +440,7 @@ for i in ${!COREDUMPS[@]} ; do ...@@ -436,7 +440,7 @@ for i in ${!COREDUMPS[@]} ; do
ln -s ${cf} ${dest}/tmp/${cfname} ln -s ${cf} ${dest}/tmp/${cfname}
cp ${outputdir}/${cfname}*.txt ${dest}/tmp/ 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 if $tarball_config ; then
cp -a /etc/asterisk ${dest}/etc/ cp -a /etc/asterisk ${dest}/etc/
fi fi
...@@ -445,6 +449,7 @@ for i in ${!COREDUMPS[@]} ; do ...@@ -445,6 +449,7 @@ for i in ${!COREDUMPS[@]} ; do
cp -a /usr/sbin/asterisk ${dest}/usr/sbin cp -a /usr/sbin/asterisk ${dest}/usr/sbin
rm -rf ${tf} rm -rf ${tf}
tar -chzf ${tf} --transform="s/^[.]/${cfname}/" -C ${dest} . tar -chzf ${tf} --transform="s/^[.]/${cfname}/" -C ${dest} .
sleep 3
rm -rf ${dest} rm -rf ${dest}
echo "Created $tf" echo "Created $tf"
elif $tarball_results ; then elif $tarball_results ; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment