ztrace: clean up screen on exit
This commit is contained in:
parent
6d9684c838
commit
b231456b7b
|
@ -1,10 +1,16 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
cleanup() {
|
||||||
|
tput clear
|
||||||
|
}
|
||||||
|
|
||||||
# Unusable for now with busybox-provided dmesg/less
|
# Unusable for now with busybox-provided dmesg/less
|
||||||
if ! dmesg -T --time-format reltime -f user -l 7 >/dev/null 2>&1 ; then
|
if ! dmesg -T --time-format reltime -f user -l 7 >/dev/null 2>&1 ; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
trap cleanup EXIT INT TERM
|
||||||
|
|
||||||
r="\033[0;31m"
|
r="\033[0;31m"
|
||||||
g="\033[0;32m"
|
g="\033[0;32m"
|
||||||
o="\033[0;33m"
|
o="\033[0;33m"
|
||||||
|
|
Loading…
Reference in New Issue