Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
packages
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Firmware
packages
Commits
2056eaeb
Commit
2056eaeb
authored
11 years ago
by
Clemens John
Browse files
Options
Downloads
Patches
Plain Diff
Prepare watchdog for Netmons new REST API
parent
d1d179bd
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ath9k-watchdog/files/ath9k-watchdog
+1
-1
1 addition, 1 deletion
ath9k-watchdog/files/ath9k-watchdog
ath9k-watchdog/files/ath9k-watchdog-pm
+2
-2
2 additions, 2 deletions
ath9k-watchdog/files/ath9k-watchdog-pm
with
3 additions
and
3 deletions
ath9k-watchdog/files/ath9k-watchdog
+
1
−
1
View file @
2056eaeb
...
...
@@ -17,7 +17,7 @@ do
# Perform post-mortem dump
tstmp
=
$(
/bin/date +%s
)
echo
-n
"hostname=
${
hostname
}
&tstmp=
${
tstmp
}
"
>
/tmp/
$tstmp
echo
-n
"
data[
hostname
]
=
${
hostname
}
&
data[
tstmp
]
=
${
tstmp
}
"
>
/tmp/
$tstmp
# Move into upload directory
mv
/tmp/
$tstmp
/usr/lib/ath9k-watchdog
...
...
This diff is collapsed.
Click to expand it.
ath9k-watchdog/files/ath9k-watchdog-pm
+
2
−
2
View file @
2056eaeb
#!/bin/sh
# Save log
mkdir
-p
/usr/lib/ath9k-watchdog
UPLOAD_URL
=
"http://[
$(
uci get configurator.@api[0].ipv6_address
)
%
$(
uci get configurator.@api[0].ipv6_interface
)
]/a
th9k-crash
/"
UPLOAD_URL
=
"http://[
$(
uci get configurator.@api[0].ipv6_address
)
%
$(
uci get configurator.@api[0].ipv6_interface
)
]/a
pi/rest/event
/"
WGETC
=
$(
which wget
)
...
...
@@ -12,7 +12,7 @@ cd /usr/lib/ath9k-watchdog
while
[
1
=
1
]
do
for
f
in
$(
ls
.
)
;
do
$WGETC
-q
$UPLOAD_URL
?
$(
cat
$f
)
-O
-
&&
rm
$f
$WGETC
-q
$UPLOAD_URL
"?object=router&object_id="
$(
uci get configurator.@crawl[0].router_id
)
"&data[action]=watchdog_ath9k_bug&"
$(
cat
$f
)
-O
-
&&
rm
$f
done
sleep
60
# If there are more than 15 files, assume that files cannot be uploaded
...
...
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