mirror of
https://github.com/Doodle3D/doodle3d-firmware.git
synced 2024-12-22 11:03:48 +01:00
Create convenience aliases (tailfw & tailp3d) for loglite.
This commit is contained in:
parent
7f5e10eb80
commit
b27506d236
@ -36,7 +36,7 @@ addFirewallNet() {
|
|||||||
### Replace the banner with a custom one
|
### Replace the banner with a custom one
|
||||||
if [ ! -f $IPKG_INSTROOT/etc/banner.default ]; then
|
if [ ! -f $IPKG_INSTROOT/etc/banner.default ]; then
|
||||||
mv $IPKG_INSTROOT/etc/banner $IPKG_INSTROOT/etc/banner.default
|
mv $IPKG_INSTROOT/etc/banner $IPKG_INSTROOT/etc/banner.default
|
||||||
cat <<-'EOM' > $IPKG_INSTROOT/etc/banner
|
cat <<-\EOM > $IPKG_INSTROOT/etc/banner
|
||||||
........D o o d l e 3 D
|
........D o o d l e 3 D
|
||||||
.......________ _____ _____
|
.......________ _____ _____
|
||||||
....../ / / |__ / __/ / - /___ __
|
....../ / / |__ / __/ / - /___ __
|
||||||
@ -52,17 +52,23 @@ fi
|
|||||||
mkdir -p $IPKG_INSTROOT/root
|
mkdir -p $IPKG_INSTROOT/root
|
||||||
grep '^# DO NOT MODIFY.*wifibox package.$' $IPKG_INSTROOT/root/.profile >/dev/null 2>&1
|
grep '^# DO NOT MODIFY.*wifibox package.$' $IPKG_INSTROOT/root/.profile >/dev/null 2>&1
|
||||||
if [ $? -gt 0 ]; then
|
if [ $? -gt 0 ]; then
|
||||||
cat <<-EOM >> $IPKG_INSTROOT/root/.profile
|
cat <<-\EOM >> $IPKG_INSTROOT/root/.profile
|
||||||
|
|
||||||
# DO NOT MODIFY - this block of lines has been added by the wifibox package.
|
# DO NOT MODIFY - this block of lines has been added by the wifibox package.
|
||||||
alias d='ls -la'
|
alias d='ls -la'
|
||||||
alias d3dapi='/usr/share/lua/wifibox/script/d3dapi'
|
alias d3dapi='/usr/share/lua/wifibox/script/d3dapi'
|
||||||
alias encore='ulimit -c unlimited'
|
alias encore='ulimit -c unlimited'
|
||||||
alias wopkg='opkg -f /usr/share/lua/wifibox/opkg.conf'
|
alias wopkg='opkg -f /usr/share/lua/wifibox/opkg.conf'
|
||||||
|
|
||||||
|
alias tailfw='loglite /tmp/wifibox.log firmware'
|
||||||
|
tailp3d() {
|
||||||
|
logfile=/tmp/print3d-ttyACM0.log
|
||||||
|
if [ $# -gt 0 ]; then logfile=$1; fi
|
||||||
|
loglite "$logfile" print3d
|
||||||
|
}
|
||||||
|
|
||||||
loop() {
|
loop() {
|
||||||
if [ \$# -lt 2 ]; then echo "Please supply a delay and a command."; return 1; fi
|
if [ $# -lt 2 ]; then echo "Please supply a delay and a command."; return 1; fi
|
||||||
DELAY=\$1; shift; while true; do \$@; sleep \$DELAY; done
|
DELAY=$1; shift; while true; do $@; sleep $DELAY; done
|
||||||
}
|
}
|
||||||
EOM
|
EOM
|
||||||
fi
|
fi
|
||||||
|
@ -10,6 +10,21 @@ M.default = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- filter rules for firmware log (/tmp/wifibox.log)
|
||||||
|
M.firmware = {
|
||||||
|
['options'] = { ['mode'] = 'keep', count = 'none' },
|
||||||
|
['patterns'] = {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-- filter rules for print3d log (/tmp/print3d-*.log)
|
||||||
|
M.print3d = {
|
||||||
|
['options'] = { ['mode'] = 'keep', count = 'none' },
|
||||||
|
['patterns'] = {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
M.test = { -- TEST set
|
M.test = { -- TEST set
|
||||||
['options'] = { ['mode'] = 'keep', count = 'all' },
|
['options'] = { ['mode'] = 'keep', count = 'all' },
|
||||||
['patterns'] = {
|
['patterns'] = {
|
||||||
|
Loading…
Reference in New Issue
Block a user