diff options
author | Jim P <jim@pingle.org> | 2012-01-23 12:47:22 -0800 |
---|---|---|
committer | Jim P <jim@pingle.org> | 2012-01-23 12:47:22 -0800 |
commit | c2d8c847b872cc0573e9593f81b7c6d4f1f4c75b (patch) | |
tree | c3044e48b9b31370834c25f7582ee96b46932d81 | |
parent | 21bccd9bd78f4d1052693972959cae7c51f78e3d (diff) | |
parent | cc5e67b87b3acda63156bcd135699445a84fadfb (diff) | |
download | pfsense-packages-c2d8c847b872cc0573e9593f81b7c6d4f1f4c75b.tar.gz pfsense-packages-c2d8c847b872cc0573e9593f81b7c6d4f1f4c75b.tar.bz2 pfsense-packages-c2d8c847b872cc0573e9593f81b7c6d4f1f4c75b.zip |
Merge pull request #204 from mdima/master
Some changes / requests from the forum
-rw-r--r-- | config/lcdproc-dev/lcdproc.inc | 16 | ||||
-rw-r--r-- | config/lcdproc-dev/lcdproc.xml | 6 | ||||
-rw-r--r-- | config/lcdproc-dev/lcdproc_client.php | 13 | ||||
-rw-r--r-- | config/lcdproc-dev/lcdproc_screens.xml | 2 | ||||
-rw-r--r-- | pkg_config.8.xml | 3 | ||||
-rw-r--r-- | pkg_config.8.xml.amd64 | 3 |
6 files changed, 24 insertions, 19 deletions
diff --git a/config/lcdproc-dev/lcdproc.inc b/config/lcdproc-dev/lcdproc.inc index 5971f61f..3d0a7e69 100644 --- a/config/lcdproc-dev/lcdproc.inc +++ b/config/lcdproc-dev/lcdproc.inc @@ -2,7 +2,7 @@ /* $Id$ */ /* lcdproc.inc - Copyright (C) 2007 Seth Mos <seth.mos@dds.nl> + Copyright (C) 2007 Seth Mos <seth.mos@xs4all.nl> All rights reserved. Redistribution and use in source and binary forms, with or without @@ -237,6 +237,7 @@ $config_text .= "User=nobody\n"; $config_text .= "ServerScreen=no\n"; $config_text .= "Foreground=no\n"; + $config_text .= "TitleSpeed=10\n"; $config_text .= "DriverPath=/usr/local/lib/lcdproc/\n"; $config_text .= "GoodBye=\"Thanks for using\"\n"; $config_text .= "GoodBye=\" {$g['product_name']} \"\n"; @@ -501,23 +502,24 @@ /* generate rc file start and stop */ $client_script = <<<EOD #!/bin/sh -# script starts a lcd client and always keeps it active. +# script starts a lcd client and always keeps it active for 3 attemps counter=1 -while [ "\$counter" -ne 0 ] +while [ \$counter -le 3 ] do # loop the client to drive the display - /usr/local/bin/php -f /usr/local/pkg/lcdproc_client.php + /usr/local/bin/php -f /usr/local/pkg/lcdproc_client.php + counter=\$(( \$counter + 1 )) sleep 1 done EOD; /* generate rc file start and stop */ $stop = <<<EOD if [ `ps auxw |awk '/lcdclient.s[h]/ {print $2}'| wc -l` != 0 ]; then - ps auxw |awk '/lcdclient.s[h]/ {print $2}'|xargs kill + ps auxw |awk '/lcdclient.s[h]/ {print $2}'|xargs kill -9 sleep 1 fi if [ `ps auxw |awk '/LCD[d]/ {print $2}'| wc -l` != 0 ]; then - ps auxw |awk '/LCD[d]/ {print $2}'|xargs kill + ps auxw |awk '/LCD[d]/ {print $2}'|xargs kill -9 sleep 1 fi EOD; @@ -586,4 +588,4 @@ EOD; } return $returnvalue; } -?> +?>
\ No newline at end of file diff --git a/config/lcdproc-dev/lcdproc.xml b/config/lcdproc-dev/lcdproc.xml index ff80e8a3..51a80f72 100644 --- a/config/lcdproc-dev/lcdproc.xml +++ b/config/lcdproc-dev/lcdproc.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8" ?> <packagegui> - <title>Services: LCDproc 0.5.5 pkg v. 0.8</title> + <title>Services: LCDproc 0.5.5 pkg v. 0.9</title> <name>lcdproc</name> - <version>0.5.5 pkg v. 0.8</version> + <version>0.5.5 pkg v. 0.9</version> <savetext>Save</savetext> <include_file>/usr/local/pkg/lcdproc.inc</include_file> <tabs> @@ -55,7 +55,7 @@ </service> <fields> <field> - <fielddescr>Enable LCDproc</fielddescr> + <fielddescr>Enable LCDproc at startup</fielddescr> <fieldname>enable</fieldname> <type>checkbox</type> </field> diff --git a/config/lcdproc-dev/lcdproc_client.php b/config/lcdproc-dev/lcdproc_client.php index be7efa3f..d931b9d0 100644 --- a/config/lcdproc-dev/lcdproc_client.php +++ b/config/lcdproc-dev/lcdproc_client.php @@ -2,7 +2,7 @@ /* $Id$ */ /* lcdproc_client.php - Copyright (C) 2007 Seth Mos <seth.mos@dds.nl> + Copyright (C) 2007 Seth Mos <seth.mos@xs4all.nl> All rights reserved. Redistribution and use in source and binary forms, with or without @@ -97,13 +97,14 @@ function get_uptime_stats() { exec("/usr/bin/uptime", $output, $ret); + $temp = explode(",", $output[0]); if(stristr($output[0], "day")) { - $temp = explode(" ", $output[0]); - $status = "$temp[2] $temp[3] $temp[4] $temp[5] $temp[6] $temp[7] ". substr($temp[8], 0, -1); + $status = "$temp[0] $temp[1]"; } else { - $temp = explode(" ", $output[0]); - $status = "$temp[2] $temp[3] $temp[4] $temp[5] $temp[6] ". substr($temp[7], 0, -1); + $status = "$temp[0] "; } + $status = trim(str_replace(" ", " ", $status)); + $status = substr($status, strpos($status, "up ") + 3); return($status); } @@ -892,4 +893,4 @@ /* loop exited? Close fd and wait for the script to kick in again */ fclose($lcd); } -?> +?>
\ No newline at end of file diff --git a/config/lcdproc-dev/lcdproc_screens.xml b/config/lcdproc-dev/lcdproc_screens.xml index 8b79870d..b49018e3 100644 --- a/config/lcdproc-dev/lcdproc_screens.xml +++ b/config/lcdproc-dev/lcdproc_screens.xml @@ -2,7 +2,7 @@ <packagegui> <title>Services: LCDproc: Screens</title> <name>lcdproc_screens</name> - <version>0.5.5 pkg v. 0.8</version> + <version>0.5.5 pkg v. 0.9</version> <savetext>Save</savetext> <include_file>/usr/local/pkg/lcdproc.inc</include_file> <tabs> diff --git a/pkg_config.8.xml b/pkg_config.8.xml index d7dc025c..84dc990b 100644 --- a/pkg_config.8.xml +++ b/pkg_config.8.xml @@ -1015,7 +1015,7 @@ <descr>LCD display driver - Development version</descr> <website>http://www.lcdproc.org/</website> <category>Utility</category> - <version>lcdproc-0.5.5 pkg v. 0.8</version> + <version>lcdproc-0.5.5 pkg v. 0.9</version> <status>BETA</status> <required_version>2.0</required_version> <maintainer>michele@nt2.it</maintainer> @@ -1026,6 +1026,7 @@ <configurationfile>lcdproc.xml</configurationfile> <build_port_path>/usr/ports/sysutils/lcdproc</build_port_path> <build_options>WITH_USB=true</build_options> + <after_install_info>Please set the service options in Services-LCDproc before running the service.</after_install_info> </package> <package> <name>arpwatch</name> diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64 index f8ea97ce..fc9b034b 100644 --- a/pkg_config.8.xml.amd64 +++ b/pkg_config.8.xml.amd64 @@ -988,7 +988,7 @@ <descr>LCD display driver - Development version</descr> <website>http://www.lcdproc.org/</website> <category>Utility</category> - <version>lcdproc-0.5.5 pkg v. 0.8</version> + <version>lcdproc-0.5.5 pkg v. 0.9</version> <status>BETA</status> <required_version>2.0</required_version> <maintainer>michele@nt2.it</maintainer> @@ -999,6 +999,7 @@ <configurationfile>lcdproc.xml</configurationfile> <build_port_path>/usr/ports/sysutils/lcdproc</build_port_path> <build_options>WITH_USB=true</build_options> + <after_install_info>Please set the service options in Services-LCDproc before running the service.</after_install_info> </package> <package> <name>arpwatch</name> |