mirror of https://github.com/OpenIPC/firmware.git
added send coredump ability for all platforms
parent
4759bce18f
commit
3ebf9a08d5
|
@ -12,6 +12,11 @@ load_majestic() {
|
||||||
printf 'Starting %s: ' "$DAEMON"
|
printf 'Starting %s: ' "$DAEMON"
|
||||||
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
||||||
# shellcheck disable=SC2086 # we need the word splitting
|
# shellcheck disable=SC2086 # we need the word splitting
|
||||||
|
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
|
||||||
|
if [ "$coredump_enabled" ]; then
|
||||||
|
[ "$(yaml-cli -i /etc/majestic.yaml -g .watchdog.timeout)" -lt "30" ] && yaml-cli -i /etc/majestic.yaml -s .watchdog.timeout 30
|
||||||
|
ulimit -c unlimited && echo "|/usr/sbin/sendcoredump.sh" >/proc/sys/kernel/core_pattern
|
||||||
|
fi
|
||||||
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
||||||
-- $DAEMON_ARGS
|
-- $DAEMON_ARGS
|
||||||
status=$?
|
status=$?
|
||||||
|
|
|
@ -12,6 +12,11 @@ load_majestic() {
|
||||||
printf 'Starting %s: ' "$DAEMON"
|
printf 'Starting %s: ' "$DAEMON"
|
||||||
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
||||||
# shellcheck disable=SC2086 # we need the word splitting
|
# shellcheck disable=SC2086 # we need the word splitting
|
||||||
|
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
|
||||||
|
if [ "$coredump_enabled" ]; then
|
||||||
|
[ "$(yaml-cli -i /etc/majestic.yaml -g .watchdog.timeout)" -lt "30" ] && yaml-cli -i /etc/majestic.yaml -s .watchdog.timeout 30
|
||||||
|
ulimit -c unlimited && echo "|/usr/sbin/sendcoredump.sh" >/proc/sys/kernel/core_pattern
|
||||||
|
fi
|
||||||
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
||||||
-- $DAEMON_ARGS
|
-- $DAEMON_ARGS
|
||||||
status=$?
|
status=$?
|
||||||
|
|
|
@ -12,6 +12,11 @@ load_majestic() {
|
||||||
printf 'Starting %s: ' "$DAEMON"
|
printf 'Starting %s: ' "$DAEMON"
|
||||||
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
||||||
# shellcheck disable=SC2086 # we need the word splitting
|
# shellcheck disable=SC2086 # we need the word splitting
|
||||||
|
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
|
||||||
|
if [ "$coredump_enabled" ]; then
|
||||||
|
[ "$(yaml-cli -i /etc/majestic.yaml -g .watchdog.timeout)" -lt "30" ] && yaml-cli -i /etc/majestic.yaml -s .watchdog.timeout 30
|
||||||
|
ulimit -c unlimited && echo "|/usr/sbin/sendcoredump.sh" >/proc/sys/kernel/core_pattern
|
||||||
|
fi
|
||||||
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
||||||
-- $DAEMON_ARGS
|
-- $DAEMON_ARGS
|
||||||
status=$?
|
status=$?
|
||||||
|
|
|
@ -12,6 +12,11 @@ load_majestic() {
|
||||||
printf 'Starting %s: ' "$DAEMON"
|
printf 'Starting %s: ' "$DAEMON"
|
||||||
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
||||||
# shellcheck disable=SC2086 # we need the word splitting
|
# shellcheck disable=SC2086 # we need the word splitting
|
||||||
|
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
|
||||||
|
if [ "$coredump_enabled" ]; then
|
||||||
|
[ "$(yaml-cli -i /etc/majestic.yaml -g .watchdog.timeout)" -lt "30" ] && yaml-cli -i /etc/majestic.yaml -s .watchdog.timeout 30
|
||||||
|
ulimit -c unlimited && echo "|/usr/sbin/sendcoredump.sh" >/proc/sys/kernel/core_pattern
|
||||||
|
fi
|
||||||
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
||||||
-- $DAEMON_ARGS
|
-- $DAEMON_ARGS
|
||||||
status=$?
|
status=$?
|
||||||
|
|
|
@ -12,6 +12,11 @@ load_majestic() {
|
||||||
printf 'Starting %s: ' "$DAEMON"
|
printf 'Starting %s: ' "$DAEMON"
|
||||||
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
||||||
# shellcheck disable=SC2086 # we need the word splitting
|
# shellcheck disable=SC2086 # we need the word splitting
|
||||||
|
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
|
||||||
|
if [ "$coredump_enabled" ]; then
|
||||||
|
[ "$(yaml-cli -i /etc/majestic.yaml -g .watchdog.timeout)" -lt "30" ] && yaml-cli -i /etc/majestic.yaml -s .watchdog.timeout 30
|
||||||
|
ulimit -c unlimited && echo "|/usr/sbin/sendcoredump.sh" >/proc/sys/kernel/core_pattern
|
||||||
|
fi
|
||||||
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
||||||
-- $DAEMON_ARGS
|
-- $DAEMON_ARGS
|
||||||
status=$?
|
status=$?
|
||||||
|
|
|
@ -12,6 +12,11 @@ load_majestic() {
|
||||||
printf 'Starting %s: ' "$DAEMON"
|
printf 'Starting %s: ' "$DAEMON"
|
||||||
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
||||||
# shellcheck disable=SC2086 # we need the word splitting
|
# shellcheck disable=SC2086 # we need the word splitting
|
||||||
|
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
|
||||||
|
if [ "$coredump_enabled" ]; then
|
||||||
|
[ "$(yaml-cli -i /etc/majestic.yaml -g .watchdog.timeout)" -lt "30" ] && yaml-cli -i /etc/majestic.yaml -s .watchdog.timeout 30
|
||||||
|
ulimit -c unlimited && echo "|/usr/sbin/sendcoredump.sh" >/proc/sys/kernel/core_pattern
|
||||||
|
fi
|
||||||
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
||||||
-- $DAEMON_ARGS
|
-- $DAEMON_ARGS
|
||||||
status=$?
|
status=$?
|
||||||
|
|
|
@ -12,6 +12,11 @@ load_majestic() {
|
||||||
printf 'Starting %s: ' "$DAEMON"
|
printf 'Starting %s: ' "$DAEMON"
|
||||||
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
||||||
# shellcheck disable=SC2086 # we need the word splitting
|
# shellcheck disable=SC2086 # we need the word splitting
|
||||||
|
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
|
||||||
|
if [ "$coredump_enabled" ]; then
|
||||||
|
[ "$(yaml-cli -i /etc/majestic.yaml -g .watchdog.timeout)" -lt "30" ] && yaml-cli -i /etc/majestic.yaml -s .watchdog.timeout 30
|
||||||
|
ulimit -c unlimited && echo "|/usr/sbin/sendcoredump.sh" >/proc/sys/kernel/core_pattern
|
||||||
|
fi
|
||||||
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
||||||
-- $DAEMON_ARGS
|
-- $DAEMON_ARGS
|
||||||
status=$?
|
status=$?
|
||||||
|
|
|
@ -12,6 +12,11 @@ load_majestic() {
|
||||||
printf 'Starting %s: ' "$DAEMON"
|
printf 'Starting %s: ' "$DAEMON"
|
||||||
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
||||||
# shellcheck disable=SC2086 # we need the word splitting
|
# shellcheck disable=SC2086 # we need the word splitting
|
||||||
|
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
|
||||||
|
if [ "$coredump_enabled" ]; then
|
||||||
|
[ "$(yaml-cli -i /etc/majestic.yaml -g .watchdog.timeout)" -lt "30" ] && yaml-cli -i /etc/majestic.yaml -s .watchdog.timeout 30
|
||||||
|
ulimit -c unlimited && echo "|/usr/sbin/sendcoredump.sh" >/proc/sys/kernel/core_pattern
|
||||||
|
fi
|
||||||
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
||||||
-- $DAEMON_ARGS
|
-- $DAEMON_ARGS
|
||||||
status=$?
|
status=$?
|
||||||
|
|
|
@ -12,6 +12,11 @@ load_majestic() {
|
||||||
printf 'Starting %s: ' "$DAEMON"
|
printf 'Starting %s: ' "$DAEMON"
|
||||||
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
||||||
# shellcheck disable=SC2086 # we need the word splitting
|
# shellcheck disable=SC2086 # we need the word splitting
|
||||||
|
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
|
||||||
|
if [ "$coredump_enabled" ]; then
|
||||||
|
[ "$(yaml-cli -i /etc/majestic.yaml -g .watchdog.timeout)" -lt "30" ] && yaml-cli -i /etc/majestic.yaml -s .watchdog.timeout 30
|
||||||
|
ulimit -c unlimited && echo "|/usr/sbin/sendcoredump.sh" >/proc/sys/kernel/core_pattern
|
||||||
|
fi
|
||||||
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
||||||
-- $DAEMON_ARGS
|
-- $DAEMON_ARGS
|
||||||
status=$?
|
status=$?
|
||||||
|
|
|
@ -12,6 +12,11 @@ load_majestic() {
|
||||||
printf 'Starting %s: ' "$DAEMON"
|
printf 'Starting %s: ' "$DAEMON"
|
||||||
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
||||||
# shellcheck disable=SC2086 # we need the word splitting
|
# shellcheck disable=SC2086 # we need the word splitting
|
||||||
|
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
|
||||||
|
if [ "$coredump_enabled" ]; then
|
||||||
|
[ "$(yaml-cli -i /etc/majestic.yaml -g .watchdog.timeout)" -lt "30" ] && yaml-cli -i /etc/majestic.yaml -s .watchdog.timeout 30
|
||||||
|
ulimit -c unlimited && echo "|/usr/sbin/sendcoredump.sh" >/proc/sys/kernel/core_pattern
|
||||||
|
fi
|
||||||
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
||||||
-- $DAEMON_ARGS
|
-- $DAEMON_ARGS
|
||||||
status=$?
|
status=$?
|
||||||
|
|
|
@ -12,6 +12,11 @@ load_majestic() {
|
||||||
printf 'Starting %s: ' "$DAEMON"
|
printf 'Starting %s: ' "$DAEMON"
|
||||||
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
||||||
# shellcheck disable=SC2086 # we need the word splitting
|
# shellcheck disable=SC2086 # we need the word splitting
|
||||||
|
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
|
||||||
|
if [ "$coredump_enabled" ]; then
|
||||||
|
[ "$(yaml-cli -i /etc/majestic.yaml -g .watchdog.timeout)" -lt "30" ] && yaml-cli -i /etc/majestic.yaml -s .watchdog.timeout 30
|
||||||
|
ulimit -c unlimited && echo "|/usr/sbin/sendcoredump.sh" >/proc/sys/kernel/core_pattern
|
||||||
|
fi
|
||||||
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
||||||
-- $DAEMON_ARGS
|
-- $DAEMON_ARGS
|
||||||
status=$?
|
status=$?
|
||||||
|
|
|
@ -12,6 +12,11 @@ load_majestic() {
|
||||||
printf 'Starting %s: ' "$DAEMON"
|
printf 'Starting %s: ' "$DAEMON"
|
||||||
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
||||||
# shellcheck disable=SC2086 # we need the word splitting
|
# shellcheck disable=SC2086 # we need the word splitting
|
||||||
|
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
|
||||||
|
if [ "$coredump_enabled" ]; then
|
||||||
|
[ "$(yaml-cli -i /etc/majestic.yaml -g .watchdog.timeout)" -lt "30" ] && yaml-cli -i /etc/majestic.yaml -s .watchdog.timeout 30
|
||||||
|
ulimit -c unlimited && echo "|/usr/sbin/sendcoredump.sh" >/proc/sys/kernel/core_pattern
|
||||||
|
fi
|
||||||
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
||||||
-- $DAEMON_ARGS
|
-- $DAEMON_ARGS
|
||||||
status=$?
|
status=$?
|
||||||
|
|
|
@ -12,6 +12,11 @@ load_majestic() {
|
||||||
printf 'Starting %s: ' "$DAEMON"
|
printf 'Starting %s: ' "$DAEMON"
|
||||||
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
|
||||||
# shellcheck disable=SC2086 # we need the word splitting
|
# shellcheck disable=SC2086 # we need the word splitting
|
||||||
|
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
|
||||||
|
if [ "$coredump_enabled" ]; then
|
||||||
|
[ "$(yaml-cli -i /etc/majestic.yaml -g .watchdog.timeout)" -lt "30" ] && yaml-cli -i /etc/majestic.yaml -s .watchdog.timeout 30
|
||||||
|
ulimit -c unlimited && echo "|/usr/sbin/sendcoredump.sh" >/proc/sys/kernel/core_pattern
|
||||||
|
fi
|
||||||
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
|
||||||
-- $DAEMON_ARGS
|
-- $DAEMON_ARGS
|
||||||
status=$?
|
status=$?
|
||||||
|
|
Loading…
Reference in New Issue