[vdr-plugin-systeminfo] 01/07: New upstream version 0.1.4

Tobias Grimm tiber-guest at moszumanska.debian.org
Sat Feb 17 12:17:32 UTC 2018


This is an automated email from the git hooks/post-receive script.

tiber-guest pushed a commit to branch master
in repository vdr-plugin-systeminfo.

commit fdc0b40ed60374048b298fee7bb13a8bccd4f40e
Author: Tobias Grimm <git at e-tobi.net>
Date:   Sat Feb 17 13:05:18 2018 +0100

    New upstream version 0.1.4
---
 50-systeminfo.conf    |  4 ++++
 HISTORY               |  7 +++++++
 README                |  1 +
 displayinfo.c         | 28 ++++++++++++++--------------
 po/de_DE.po           |  2 +-
 po/it_IT.po           |  2 +-
 scripts/systeminfo.sh | 29 +++++++++++++++++++----------
 systeminfo.c          |  2 +-
 8 files changed, 48 insertions(+), 27 deletions(-)

diff --git a/50-systeminfo.conf b/50-systeminfo.conf
new file mode 100644
index 0000000..127c153
--- /dev/null
+++ b/50-systeminfo.conf
@@ -0,0 +1,4 @@
+[systeminfo]
+# optional name and path of system info script
+#  default: /usr/local/bin/systeminfo.sh
+#--script=<script>
diff --git a/HISTORY b/HISTORY
index 855cfb3..2bb49e9 100644
--- a/HISTORY
+++ b/HISTORY
@@ -26,3 +26,10 @@ VDR Plugin 'systeminfo' Revision History
 
 2013-02-10: Version 0.1.3
 - adapted Makefile to be compatible with VDR 1.7.36+
+
+2016-03-20: Version 0.1.4
+- added support for /etc/os-release for getting the distribution and fall back to distribution specific files if
+  it does not exist
+- added example script 50-systeminfo.conf for conf.d mechanism
+- fixed compile errors with VDR 2.3.1
+- added uptime to systeminfo.sh
diff --git a/README b/README
index ce134c2..de647bb 100644
--- a/README
+++ b/README
@@ -75,6 +75,7 @@ The path to the external script can be supplied via command line parameter:
   -s SCRIPT, --script=SCRIPT   optional name and path of system info script
                                (default: '/usr/local/bin/systeminfo.sh')
 
+If you are using the conf.d mechanism you can also use the provided file 50-systeminfo.conf.
 
 Setup Options:
 --------------
diff --git a/displayinfo.c b/displayinfo.c
index 147c00c..a3aad1b 100644
--- a/displayinfo.c
+++ b/displayinfo.c
@@ -224,9 +224,9 @@ cString cInfoLines::PrepareInfoline(int line, bool *isStatic)
 void cInfoLines::Action()
 {
    int line = 0;
-   Lock();
+   cThread::Lock();
    Clear();
-   Unlock();
+   cThread::Unlock();
    cString osdline = NULL;
 
    GetCpuPct(); // init cpu usage
@@ -236,35 +236,35 @@ void cInfoLines::Action()
 
       osdline = PrepareInfoline(++line, &isStatic);
       if ((const char*)osdline) {
-         Lock();
+         cThread::Lock();
          Add(new cInfoLine(osdline, isStatic));
-         Unlock();
+         cThread::Unlock();
       }
    }
    while (Running() && NULL != (const char*)osdline && line <= MAX_LINES);
 
    if (!First()) {
-      Lock();
+      cThread::Lock();
       osdline = tr("Error getting system information");
       Add(new cInfoLine(osdline, true));
       state++;
-      Unlock();
+      cThread::Unlock();
    }
       else
    {
-      Lock();
+      cThread::Lock();
       state++;
-      Unlock();
+      cThread::Unlock();
       if (Running())
          Wait.Wait(RefreshIntervall*1000);
 
       while (Running()) {
          cInfoLine * currentline = NULL;
-         Lock();
+         cThread::Lock();
          if (OsdInitialized)
             firstDisplay = false;
          currentline = First();
-         Unlock();
+         cThread::Unlock();
 
          line = 0;
          do {
@@ -274,18 +274,18 @@ void cInfoLines::Action()
             if (!currentline || !currentline->isStatic()) {
                osdline = PrepareInfoline(line, &isStatic);
                if ((const char*)osdline) {
-                  Lock();
+                  cThread::Lock();
                   currentline->SetStr(osdline);
-                  Unlock();
+                  cThread::Unlock();
                }
             }
             currentline = Next(currentline);
          }
          while (Running() && NULL != currentline && line <= MAX_LINES);
 
-         Lock();
+         cThread::Lock();
          state++;
-         Unlock();
+         cThread::Unlock();
 
          if (Running()) {
             Wait.Wait(RefreshIntervall*1000);
diff --git a/po/de_DE.po b/po/de_DE.po
index d9a1454..02f8d25 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -11,7 +11,7 @@ msgstr ""
 "PO-Revision-Date: 2008-05-19 19:34+0200\n"
 "Last-Translator: Christoph Haubrich\n"
 "Language-Team: <see README>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
diff --git a/po/it_IT.po b/po/it_IT.po
index c65f4a9..53a6826 100644
--- a/po/it_IT.po
+++ b/po/it_IT.po
@@ -11,7 +11,7 @@ msgstr ""
 "PO-Revision-Date: 2008-10-07 20:16+0100\n"
 "Last-Translator: Diego Pierotto <vdr-italian at tiscali.it>\n"
 "Language-Team: <see README>\n"
-"Language: \n"
+"Language: it\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
diff --git a/scripts/systeminfo.sh b/scripts/systeminfo.sh
index f406d6b..5b9d864 100755
--- a/scripts/systeminfo.sh
+++ b/scripts/systeminfo.sh
@@ -29,7 +29,10 @@ case "$1" in
         	;;
 
 	2)	# distribution release (static)
-		if test -f /etc/SuSE-release; then
+		if test -f /etc/os-release; then
+			DISTRI=$(grep "^NAME=" /etc/os-release|cut -d"=" -f 2)
+			RELEASE=$(grep "^PRETTY_NAME=" /etc/os-release|cut -d"=" -f 2|tr -d '"'|tr -d "'")
+		elif test -f /etc/SuSE-release; then
 			DISTRI="openSuSE"
 			RELEASE=$(head -n 1 /etc/SuSE-release)
 		elif test -f /etc/redhat-release; then
@@ -52,7 +55,7 @@ case "$1" in
 			RELEASE="rolling-release"
 		else
 			DISTRI="unknown"
-			RELEASE="unknow"
+			RELEASE="unknown"
 		fi
 		echo -ne "s\tDistribution:\t"$RELEASE
 		exit
@@ -77,50 +80,56 @@ case "$1" in
 		exit
         	;;
 
-	6)	# fan speeds
+	6)      # uptime
+		UPTIME=$(last -1 reboot|head -n 1|tr -s " "|cut -d' ' -f5-)
+		echo -ne "uptime:\t${UPTIME}"
+		exit
+		;;
+
+	7)	# fan speeds
 		CPU=$( sensors | grep -i 'CPU FAN' | tr -s ' ' | cut -d' ' -f 3)
 		CASE=$(sensors | grep -i 'SYS Fan' | tr -s ' ' | cut -d' ' -f 3)
 		echo -ne "Fans:\tCPU: "$CPU" rpm\tCase: "$CASE" rpm"
 		exit
         	;;
 
-	7)	# temperature of CPU and mainboard
+	8)	# temperature of CPU and mainboard
 		CPU=$(sensors | grep -i 'CPU TEMP' | tr -s ' ' | cut -d' ' -f 3)
 		MB=$( sensors | grep -i 'Sys temp' | tr -s ' ' | cut -d' ' -f 3)
 		echo -ne "Temperatures:\tCPU: "$CPU"\tMB: "$MB
 		exit
         	;;
 
-	8)	# temperature of hard disks
+	9)	# temperature of hard disks
 		DISK1=$(hddtemp /dev/sda | cut -d: -f1,3)
 		DISK2=$(hddtemp /dev/sdb | cut -d: -f1,3)
 		echo -ne "\t"$DISK1"\t"$DISK2
 		exit
         	;;
 
-	9)	# CPU usage
+	10)	# CPU usage
 		echo -e "CPU time:\tCPU%"
 		exit
         	;;
 
-	10)	# header (static)
+	11)	# header (static)
 		echo -ne "s\t\ttotal / free"
 		exit
 		;;
 
-	11)	# video disk usage
+	12)	# video disk usage
 		VAR=$(df -Pk /video0 | tail -n 1 | tr -s ' ' | cut -d' ' -f 2,4)
 		echo -ne "Video Disk:\t"$VAR
 		exit
         	;;
 
-	12)	# memory usage
+	13)	# memory usage
 		VAR=$( grep -E 'MemTotal|MemFree' /proc/meminfo | cut -d: -f2 | tr -d ' ')
 		echo -ne "Memory:\t"$VAR
 		exit
         	;;
 
-	13)	# swap usage
+	14)	# swap usage
 		VAR=$(grep -E 'SwapTotal|SwapFree' /proc/meminfo | cut -d: -f2 | tr -d ' ')
 		echo -ne "Swap:\t"$VAR
 		exit
diff --git a/systeminfo.c b/systeminfo.c
index 08ee526..04aced0 100644
--- a/systeminfo.c
+++ b/systeminfo.c
@@ -27,7 +27,7 @@
 #include <vdr/plugin.h>
 #include "displayinfo.h"
 
-static const char *VERSION        = "0.1.3";
+static const char *VERSION        = "0.1.4";
 static const char *DESCRIPTION    = trNOOP("Display various system informations");
 static const char *MAINMENUENTRY  = trNOOP("System Information");
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vdr-dvb/vdr-plugin-systeminfo.git



More information about the pkg-vdr-dvb-changes mailing list