aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-03-12 18:02:06 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-03-12 18:02:06 -0300
commit602bd47eef4be672ee21a24e686d1e51d4f09433 (patch)
treefac0c390feed6c7943a6dc7eecbabc9a9c099d32
parenta884d90954638f9e259fda3d020b84b3b5042030 (diff)
downloadkvmx-602bd47eef4be672ee21a24e686d1e51d4f09433.tar.gz
kvmx-602bd47eef4be672ee21a24e686d1e51d4f09433.tar.bz2
Use tail instead of cat at kvmx_log
-rwxr-xr-xkvmx17
1 files changed, 5 insertions, 12 deletions
diff --git a/kvmx b/kvmx
index c90528e..0bf3889 100755
--- a/kvmx
+++ b/kvmx
@@ -556,24 +556,17 @@ function kvmx_status {
# Print guest log
function kvmx_log {
- local blank_line=""
+ local logs=""
if [ -s "$LOGFILE" ]; then
- blank_line="1"
- echo "In $LOGFILE:"
- echo ""
- cat $LOGFILE
+ logs="$logs $LOGFILE"
fi
if [ -s "$SPICEFILE" ]; then
- if [ ! -z "$blank_line" ]; then
- echo ""
- fi
-
- echo "In $SPICEFILE:"
- echo ""
- cat $SPICEFILE
+ logs="$logs $SPICEFILE"
fi
+
+ tail -F $logs
}
# Dispatch