mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 00:14:14 +08:00
mdbx-test: не вызываем sudo
при отсутствии.
This commit is contained in:
parent
6c986ce904
commit
c4beb5a4a0
@ -275,7 +275,11 @@ case ${UNAME} in
|
|||||||
ulimit -c unlimited
|
ulimit -c unlimited
|
||||||
if [ "$(cat /proc/sys/kernel/core_pattern)" != "core.%p" ]; then
|
if [ "$(cat /proc/sys/kernel/core_pattern)" != "core.%p" ]; then
|
||||||
echo "core.%p > /proc/sys/kernel/core_pattern" >&2
|
echo "core.%p > /proc/sys/kernel/core_pattern" >&2
|
||||||
echo "core.%p" | sudo tee /proc/sys/kernel/core_pattern || true
|
if [ $(id -u) -ne 0 -a -n "$(which sudo 2>/dev/null)" ]; then
|
||||||
|
echo "core.%p" | sudo tee /proc/sys/kernel/core_pattern || true
|
||||||
|
else
|
||||||
|
(echo "core.%p" > /proc/sys/kernel/core_pattern) || true
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -213,7 +213,11 @@ case ${UNAME} in
|
|||||||
ulimit -c unlimited
|
ulimit -c unlimited
|
||||||
if [ "$(cat /proc/sys/kernel/core_pattern)" != "core.%p" ]; then
|
if [ "$(cat /proc/sys/kernel/core_pattern)" != "core.%p" ]; then
|
||||||
echo "core.%p > /proc/sys/kernel/core_pattern" >&2
|
echo "core.%p > /proc/sys/kernel/core_pattern" >&2
|
||||||
echo "core.%p" | sudo tee /proc/sys/kernel/core_pattern || true
|
if [ $(id -u) -ne 0 -a -n "$(which sudo 2>/dev/null)" ]; then
|
||||||
|
echo "core.%p" | sudo tee /proc/sys/kernel/core_pattern || true
|
||||||
|
else
|
||||||
|
(echo "core.%p" > /proc/sys/kernel/core_pattern) || true
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user