mirror of https://github.com/OpenIPC/firmware.git
source coredump.conf and check for $coredump_enabled
parent
0955f92aee
commit
ca57f473ea
|
@ -12,9 +12,8 @@ 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
|
||||||
if [ -f /etc/coredump.conf ] && [ "true" = "$(grep ^savedumps /etc/coredump.conf | cut -d= -f2)" ]; then
|
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
|
||||||
ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
|
[ "$coredump_enabled" ] && 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,9 +12,8 @@ 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
|
||||||
if [ -f /etc/coredump.conf ] && [ "true" = "$(grep ^savedumps /etc/coredump.conf | cut -d= -f2)" ]; then
|
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
|
||||||
ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
|
[ "$coredump_enabled" ] && 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,9 +12,8 @@ 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
|
||||||
if [ -f /etc/coredump.conf ] && [ "true" = "$(grep ^savedumps /etc/coredump.conf | cut -d= -f2)" ]; then
|
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
|
||||||
ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
|
[ "$coredump_enabled" ] && 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,9 +12,8 @@ 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
|
||||||
if [ -f /etc/coredump.conf ] && [ "true" = "$(grep ^savedumps /etc/coredump.conf | cut -d= -f2)" ]; then
|
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
|
||||||
ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
|
[ "$coredump_enabled" ] && 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,9 +12,8 @@ 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
|
||||||
if [ -f /etc/coredump.conf ] && [ "true" = "$(grep ^savedumps /etc/coredump.conf | cut -d= -f2)" ]; then
|
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
|
||||||
ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
|
[ "$coredump_enabled" ] && 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,9 +12,8 @@ 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
|
||||||
if [ -f /etc/coredump.conf ] && [ "true" = "$(grep ^savedumps /etc/coredump.conf | cut -d= -f2)" ]; then
|
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
|
||||||
ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
|
[ "$coredump_enabled" ] && 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,9 +12,8 @@ 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
|
||||||
if [ -f /etc/coredump.conf ] && [ "true" = "$(grep ^savedumps /etc/coredump.conf | cut -d= -f2)" ]; then
|
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
|
||||||
ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
|
[ "$coredump_enabled" ] && 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,9 +12,8 @@ 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
|
||||||
if [ -f /etc/coredump.conf ] && [ "true" = "$(grep ^savedumps /etc/coredump.conf | cut -d= -f2)" ]; then
|
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
|
||||||
ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
|
[ "$coredump_enabled" ] && 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,9 +12,8 @@ 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
|
||||||
if [ -f /etc/coredump.conf ] && [ "true" = "$(grep ^savedumps /etc/coredump.conf | cut -d= -f2)" ]; then
|
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
|
||||||
ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
|
[ "$coredump_enabled" ] && 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,9 +12,8 @@ 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
|
||||||
if [ -f /etc/coredump.conf ] && [ "true" = "$(grep ^savedumps /etc/coredump.conf | cut -d= -f2)" ]; then
|
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
|
||||||
ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
|
[ "$coredump_enabled" ] && 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=$?
|
||||||
|
@ -76,4 +75,3 @@ case "$1" in
|
||||||
echo "Usage: $0 {start|stop|restart|reload}"
|
echo "Usage: $0 {start|stop|restart|reload}"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue