MT#7333 Show list of cores if they exist

mr3.4.1
Alexander Lutay 12 years ago
parent 384a145b63
commit 182a1bd65c

@ -1,13 +1,14 @@
#!/bin/bash
SYSCTL="/sbin/sysctl"
CORE_DIR=$(dirname $(${SYSCTL} kernel.core_pattern | awk '{print $3}'| sed -e "s_'__g"))
CORE_FILES=$(ls -1 -m ${CORE_DIR})
NUM_FILES=$(ls -1 ${CORE_DIR}|wc -l)
echo "1..1"
if [ -d ${CORE_DIR} ]; then
if [[ $NUM_FILES > 0 ]]; then
echo "not ok 1 - ${CORE_DIR} not empty"
echo "not ok 1 - ${CORE_DIR} not empty: ${CORE_FILES}"
else
echo "ok 1 - ${CORE_DIR} empty"
fi

Loading…
Cancel
Save