[PATCH v2 4/5] nodewatcher: Add prefix to debug messages
Fabian Bläse
fabian at blaese.de
Mi Apr 22 16:05:26 CEST 2020
Because nodewatcher is executed using a cron, but
our cron has no way to report the origin of a specific
log entry, a 'nodewatcher:' prefix is added to all debug
output.
Signed-off-by: Fabian Bläse <fabian at blaese.de>
---
Changes in v2:
- Added patch
---
.../fff-batman-adv/files/usr/lib/nodewatcher.d/30-batman-adv.sh | 2 +-
.../fff-network/files/usr/lib/nodewatcher.d/20-interfaces.sh | 2 +-
.../fff/fff-network/files/usr/lib/nodewatcher.d/50-clients.sh | 2 +-
.../files/usr/lib/nodewatcher.d/10-systemdata.sh | 2 +-
src/packages/fff/fff-nodewatcher/files/usr/sbin/nodewatcher | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/packages/fff/fff-batman-adv/files/usr/lib/nodewatcher.d/30-batman-adv.sh b/src/packages/fff/fff-batman-adv/files/usr/lib/nodewatcher.d/30-batman-adv.sh
index 9639761..6271159 100755
--- a/src/packages/fff/fff-batman-adv/files/usr/lib/nodewatcher.d/30-batman-adv.sh
+++ b/src/packages/fff/fff-batman-adv/files/usr/lib/nodewatcher.d/30-batman-adv.sh
@@ -3,7 +3,7 @@
# License; GPL v3
debug() {
- (>&2 echo "$1")
+ (>&2 echo "nodewatcher: $1")
}
debug "Collecting information from batman advanced and its interfaces"
diff --git a/src/packages/fff/fff-network/files/usr/lib/nodewatcher.d/20-interfaces.sh b/src/packages/fff/fff-network/files/usr/lib/nodewatcher.d/20-interfaces.sh
index 44d2cea..ba7f02f 100755
--- a/src/packages/fff/fff-network/files/usr/lib/nodewatcher.d/20-interfaces.sh
+++ b/src/packages/fff/fff-network/files/usr/lib/nodewatcher.d/20-interfaces.sh
@@ -6,7 +6,7 @@ IFACEBLACKLIST=$(uci get nodewatcher. at network[0].iface_blacklist)
IPWHITELIST=$(uci get nodewatcher. at network[0].ip_whitelist)
debug() {
- (>&2 echo "$1")
+ (>&2 echo "nodewatcher: $1")
}
inArray() {
diff --git a/src/packages/fff/fff-network/files/usr/lib/nodewatcher.d/50-clients.sh b/src/packages/fff/fff-network/files/usr/lib/nodewatcher.d/50-clients.sh
index aca3db2..1d5cd83 100755
--- a/src/packages/fff/fff-network/files/usr/lib/nodewatcher.d/50-clients.sh
+++ b/src/packages/fff/fff-network/files/usr/lib/nodewatcher.d/50-clients.sh
@@ -5,7 +5,7 @@
MESH_INTERFACE=$(uci get nodewatcher. at network[0].mesh_interface)
debug() {
- (>&2 echo "$1")
+ (>&2 echo "nodewatcher: $1")
}
debug "Collecting information about connected clients"
diff --git a/src/packages/fff/fff-nodewatcher/files/usr/lib/nodewatcher.d/10-systemdata.sh b/src/packages/fff/fff-nodewatcher/files/usr/lib/nodewatcher.d/10-systemdata.sh
index 0f495f8..65f4cb3 100755
--- a/src/packages/fff/fff-nodewatcher/files/usr/lib/nodewatcher.d/10-systemdata.sh
+++ b/src/packages/fff/fff-nodewatcher/files/usr/lib/nodewatcher.d/10-systemdata.sh
@@ -6,7 +6,7 @@ SCRIPT_STATUS_FILE=$(uci get nodewatcher. at script[0].status_text_file)
SCRIPT_VERSION=$(cat /etc/nodewatcher_version)
debug() {
- (>&2 echo "$1")
+ (>&2 echo "nodewatcher: $1")
}
debug "Collecting basic system status data"
diff --git a/src/packages/fff/fff-nodewatcher/files/usr/sbin/nodewatcher b/src/packages/fff/fff-nodewatcher/files/usr/sbin/nodewatcher
index 8cee7ce..8b55656 100755
--- a/src/packages/fff/fff-nodewatcher/files/usr/sbin/nodewatcher
+++ b/src/packages/fff/fff-nodewatcher/files/usr/sbin/nodewatcher
@@ -17,7 +17,7 @@ trap "lock -u \"$lockfile\"" INT TERM EXIT
SCRIPT_DATA_FILE=$(uci get nodewatcher. at script[0].data_file)
debug() {
- (>&2 echo "$1")
+ (>&2 echo "nodewatcher: $1")
}
#This method generates the crawl data XML file that is being fetched by netmon
--
2.26.2
Mehr Informationen über die Mailingliste franken-dev