Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asterisk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Voice
asterisk
Commits
227f59fd
Commit
227f59fd
authored
6 years ago
by
Joshua Colp
Committed by
Gerrit Code Review
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge "ast_coredumper: Fix output directory and variable precedence"
parents
c63cd006
2bf26ce5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
configs/samples/ast_debug_tools.conf.sample
+1
-1
1 addition, 1 deletion
configs/samples/ast_debug_tools.conf.sample
contrib/scripts/ast_coredumper
+22
-4
22 additions, 4 deletions
contrib/scripts/ast_coredumper
with
23 additions
and
5 deletions
configs/samples/ast_debug_tools.conf.sample
+
1
−
1
View file @
227f59fd
...
@@ -24,7 +24,7 @@ COREDUMPS=(/tmp/core[-._]asterisk!(*.txt) /tmp/core[-._]$(hostname)!(*.txt))
...
@@ -24,7 +24,7 @@ COREDUMPS=(/tmp/core[-._]asterisk!(*.txt) /tmp/core[-._]$(hostname)!(*.txt))
# For output from existing core files, the default is the
# For output from existing core files, the default is the
# directory that the core file is found in. For core files
# directory that the core file is found in. For core files
# produced from a running process, the default is /tmp.
# produced from a running process, the default is /tmp.
OUTPUTDIR=/
some/directory
OUTPUTDIR=/
tmp
# Date command for the "running" coredump and tarballs.
# Date command for the "running" coredump and tarballs.
# DATEFORMAT will be executed to get the timestamp.
# DATEFORMAT will be executed to get the timestamp.
...
...
This diff is collapsed.
Click to expand it.
contrib/scripts/ast_coredumper
+
22
−
4
View file @
227f59fd
...
@@ -225,10 +225,28 @@ append_coredumps=false
...
@@ -225,10 +225,28 @@ append_coredumps=false
declare
-a
COREDUMPS
declare
-a
COREDUMPS
declare
-a
ARGS_COREDUMPS
declare
-a
ARGS_COREDUMPS
# Read config files from least important to most important
# readconf reads a bash-sourceable file and sets variables
[
-f
/etc/asterisk/ast_debug_tools.conf
]
&&
source
/etc/asterisk/ast_debug_tools.conf
# that havn't already been set. This allows variables set
[
-f
~/ast_debug_tools.conf
]
&&
source
~/ast_debug_tools.conf
# on the command line or that are already in the environment
[
-f
./ast_debug_tools.conf
]
&&
source
./ast_debug_tools.conf
# to take precedence over those read from the file.
#
# Setting the values can't be done in a subshell so you can't
# just pipe the output of sed into the while.
readconf
()
{
while
read
line
;
do
declare
-n
v
=
${
line
%%=*
}
[
-z
"
${
v
}
"
]
&&
eval
$line
||
:
done
<<
EOF
$(
sed
-r
-e
"/
\s
*#/d"
-e
"/^
\s
*
$/
d"
$1
)
EOF
}
# Read config files from most important to least important.
# Variable set on the command line or environment always take precedence.
[
-f
./ast_debug_tools.conf
]
&&
readconf ./ast_debug_tools.conf
[
-f
~/ast_debug_tools.conf
]
&&
readconf ~/ast_debug_tools.conf
[
-f
/etc/asterisk/ast_debug_tools.conf
]
&&
readconf /etc/asterisk/ast_debug_tools.conf
# For *BSD, the preferred gdb may be in /usr/local/bin so we
# For *BSD, the preferred gdb may be in /usr/local/bin so we
# need to search for one that supports python.
# need to search for one that supports python.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment