busybox-syslog: Log to the MMC card if present
If the first partition of a MMC card is mounted and has a logs/ directory syslog will start to write log messages to the MMC card in the directory /media/mmcblk0p1.
This commit is contained in:
parent
7389f6f2b1
commit
87f47c8586
|
@ -1,6 +1,6 @@
|
||||||
SYSMOCOM := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
|
SYSMOCOM := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
|
||||||
FILESEXTRAPATHS_prepend := "${SYSMOCOM}/files:"
|
FILESEXTRAPATHS_prepend := "${SYSMOCOM}/files:"
|
||||||
PRINC = "11"
|
PRINC = "12"
|
||||||
|
|
||||||
SRC_URI += "file://busybox-ifplugd.sh \
|
SRC_URI += "file://busybox-ifplugd.sh \
|
||||||
file://ifplugd.sh"
|
file://ifplugd.sh"
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
DESTINATION="buffer" # log destinations (buffer file remote)
|
||||||
|
MARKINT=20 # intervall between --mark-- entries
|
||||||
|
LOGFILE=/var/log/messages # where to log (file)
|
||||||
|
REMOTE=loghost:514 # where to log (syslog remote)
|
||||||
|
REDUCE=no # reduce-size logging
|
||||||
|
#ROTATESIZE=0 # rotate log if grown beyond X [kByte] (incompatible with busybox)
|
||||||
|
#ROTATEGENS=3 # keep X generations of rotated logs (incompatible with busybox)
|
||||||
|
BUFFERSIZE=64 # size of circular buffer [kByte]
|
||||||
|
FOREGROUND=no # run in foreground (don't use!)
|
||||||
|
LOGLEVEL=4
|
||||||
|
|
||||||
|
# magic when a MMC card is mounted
|
||||||
|
USING_MMC_CARD=`/bin/mount | grep /media/mmcblk0p1 | wc -l`
|
||||||
|
if [ 1 -eq $USING_MMC_CARD ] ; then
|
||||||
|
if [ -e /media/mmcblk0p1/logs ] ; then
|
||||||
|
echo "Using mmc card"
|
||||||
|
LOGFILE=/media/mmcblk0p1/logs/messages
|
||||||
|
DESTINATION="file"
|
||||||
|
ROTATESIZE=2048
|
||||||
|
ROTATEGENS=20
|
||||||
|
fi
|
||||||
|
fi
|
Loading…
Reference in New Issue