summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcleopatre/application/fw_wd/S99fwwatchd (renamed from cleopatre/application/fw_wd/S99trace)8
-rw-r--r--cleopatre/application/fw_wd/fwwatchd.default (renamed from cleopatre/application/fw_wd/trace)16
-rw-r--r--cleopatre/buildroot/package/fw_wd/fw_wd.mk12
3 files changed, 24 insertions, 12 deletions
diff --git a/cleopatre/application/fw_wd/S99trace b/cleopatre/application/fw_wd/S99fwwatchd
index fee0a1cf94..adf8b64717 100755
--- a/cleopatre/application/fw_wd/S99trace
+++ b/cleopatre/application/fw_wd/S99fwwatchd
@@ -1,9 +1,9 @@
#!/bin/sh
+# Authorize automatic system reboot on watchdog expiration.
+REBOOT=true
# Do not get trace from firmware and keep them compressed.
TRACE_ENABLED=false
-# Reboot automatically after getting trace.
-TRACE_REBOOT=true
# Trace folder.
TRACE_FOLDER=/usr/local/trace/
# Trace basename.
@@ -14,7 +14,7 @@ TRACE_HEADER_PATH=${TRACE_FOLDER}/last_head_trace.txt
TRACE_HEADER_LINE=3
# Load personnalize preferences.
-test -f /etc/default/trace && . /etc/default/trace
+test -f /etc/default/fwwatchd && . /etc/default/fwwatchd
# Do not continue if disabled.
test $TRACE_ENABLED = true || exit 1
@@ -61,4 +61,4 @@ fi
done
) | gzip -c \
> ${TRACE_FOLDER}/${TRACE_BASENAME}${new_trace_digit}.gz \
- && test $TRACE_REBOOT = true && reboot) &
+ && test $REBOOT = true && reboot) &
diff --git a/cleopatre/application/fw_wd/trace b/cleopatre/application/fw_wd/fwwatchd.default
index 87195e8f3d..f91e2b14c0 100644
--- a/cleopatre/application/fw_wd/trace
+++ b/cleopatre/application/fw_wd/fwwatchd.default
@@ -1,14 +1,24 @@
-# Configure trace behavior.
+# Configure fwwatchd behavior.
+
+#
+# Life saving procedures.
+#
+
+# Authorize automatic system reboot on watchdog expiration.
+REBOOT=true
+
+#
+# Traces.
+#
# Get trace from firmware and keep them compressed.
TRACE_ENABLED=true
-# Reboot automatically after getting trace.
-TRACE_REBOOT=true
# Where to store compressed traces.
TRACE_FOLDER="/usr/local/trace/"
# List of files to add to trace (separator is ':').
TRACE_FILES="/proc/net/plc/version:/etc/hpav.info:/proc/uptime"
+
# List of commands to get output with traces (separator is ':').
TRACE_CMDS=""
diff --git a/cleopatre/buildroot/package/fw_wd/fw_wd.mk b/cleopatre/buildroot/package/fw_wd/fw_wd.mk
index b6163e13bb..4dd4becdd1 100644
--- a/cleopatre/buildroot/package/fw_wd/fw_wd.mk
+++ b/cleopatre/buildroot/package/fw_wd/fw_wd.mk
@@ -42,20 +42,22 @@ $(TARGET_DIR)/usr/bin/fw_wd: $(FW_WD_DIR)/fw_wd
mkdir -p $(TARGET_DIR)/usr/bin
cp $(FW_WD_DIR)/fw_wd $(TARGET_DIR)/usr/bin/fw_wd
-$(TARGET_DIR)/etc/init.d/S99trace: $(FW_WD_DIR)/S99trace
+$(TARGET_DIR)/etc/init.d/S99fwwatchd: $(FW_WD_DIR)/S99fwwatchd
mkdir -p $(TARGET_DIR)/etc/init.d
cp $< $@
-$(TARGET_DIR)/etc/default/trace: $(FW_WD_DIR)/trace
+$(TARGET_DIR)/etc/default/fwwatchd: $(FW_WD_DIR)/fwwatchd.default
mkdir -p $(TARGET_DIR)/etc/default/
cp $< $@
-fw_wd: uclibc $(TARGET_DIR)/usr/bin/fw_wd $(TARGET_DIR)/etc/init.d/S99trace $(TARGET_DIR)/etc/default/trace
+fw_wd: uclibc $(TARGET_DIR)/usr/bin/fw_wd \
+ $(TARGET_DIR)/etc/init.d/S99fwwatchd \
+ $(TARGET_DIR)/etc/default/fwwatchd
fw_wd-clean:
rm -f $(TARGET_DIR)/usr/bin/fw_wd
- rm -f $(TARGET_DIR)/etc/init.d/S99trace
- rm -f $(TARGET_DIR)/etc/default/trace
+ rm -f $(TARGET_DIR)/etc/init.d/S99fwwatchd
+ rm -f $(TARGET_DIR)/etc/default/fwwatchd
-$(MAKE) -C $(FW_WD_DIR) clean
fw_wd-dirclean: