# HG changeset patch # User Christophe Lincoln # Date 1396386544 -7200 # Node ID d670034c1f005470b9609b1a0d7dc0bb545c04bc # Parent ad712df5e748f4827bec49e8a338a61d22f45df0 Improve CGI admin and rename 2 plugins diff -r ad712df5e748 -r d670034c1f00 cgi-adm/data/header.html --- a/cgi-adm/data/header.html Tue Apr 01 16:34:16 2014 +0200 +++ b/cgi-adm/data/header.html Tue Apr 01 23:09:04 2014 +0200 @@ -13,7 +13,7 @@ diff -r ad712df5e748 -r d670034c1f00 cgi-adm/plugins/config/config.cgi --- a/cgi-adm/plugins/config/config.cgi Tue Apr 01 16:34:16 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -#!/bin/sh -# -# SliTaz ARM CGI Plugin - System configs and options -# - -case " $(GET) " in - - *\ rdate\ *) - html_header "System time" - echo "

System time

" - echo "
"
-		echo -n "Old date:"; date
-		rdate -s tick.greyware.com
-		echo -n "New date:"; date 
-		echo "
" - html_footer && exit 0 ;; - - *\ config\ *) - html_header "Configuration" - cat << EOT -

System Config

- -

- Remotely configure your SliTaz ARM device. -

- -
-
- -
-
- -EOT - html_footer && exit 0 -esac diff -r ad712df5e748 -r d670034c1f00 cgi-adm/plugins/config/config.conf --- a/cgi-adm/plugins/config/config.conf Tue Apr 01 16:34:16 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -# TazBerry CGI Plugin configuration - -PLUGIN="System configuration" -SHORT_DESC="SliTaz ARM system configuration" -MAINTAINER="pankso@slitaz.org" -WEB_SITE="http://arm.slitaz.org/" diff -r ad712df5e748 -r d670034c1f00 cgi-adm/plugins/status/status.cgi --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cgi-adm/plugins/status/status.cgi Tue Apr 01 23:09:04 2014 +0200 @@ -0,0 +1,51 @@ +#!/bin/sh +# +# SliTaz ARM CGI Plugin - System configs and options +# + +if [ "$(GET status)" ]; then + html_header "Status" + cat << EOT +

System Status

+

+ Uptime: $(uptime) +

+ +

Disk usage

+
+Filesystem                Size      Used Available Use% Mounted on
+--------------------------------------------------------------------------------
+$(df -h | grep ^/dev)
+
+ +

Memory usage

+
+Type         total         used         free       shared      buffers
+--------------------------------------------------------------------------------
+$(free -m | sed "/total/d")
+
+ +

Routing table

+
+Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
+--------------------------------------------------------------------------------
+$(route | grep [0-9])
+
+ +

Kernel messages

+
+Last dmesg output
+--------------------------------------------------------------------------------
+$(dmesg | tail -n 15)
+
+ +

Kernel modules

+
+Module                  Size  Used by    Tainted: G
+--------------------------------------------------------------------------------
+$(lsmod | sed "/^Module/d")
+
+ +EOT + html_footer && exit 0 +fi diff -r ad712df5e748 -r d670034c1f00 cgi-adm/plugins/status/status.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cgi-adm/plugins/status/status.conf Tue Apr 01 23:09:04 2014 +0200 @@ -0,0 +1,6 @@ +# TazBerry CGI Plugin configuration + +PLUGIN="System status" +SHORT_DESC="SliTaz ARM system status" +MAINTAINER="pankso@slitaz.org" +WEB_SITE="http://arm.slitaz.org/" diff -r ad712df5e748 -r d670034c1f00 rpi/cgi-adm/data/header.html --- a/rpi/cgi-adm/data/header.html Tue Apr 01 16:34:16 2014 +0200 +++ b/rpi/cgi-adm/data/header.html Tue Apr 01 23:09:04 2014 +0200 @@ -5,15 +5,15 @@ TazBerry - _TITLE_ - +
diff -r ad712df5e748 -r d670034c1f00 rpi/cgi-adm/plugins/rpi_boot/rpi_boot.cgi --- a/rpi/cgi-adm/plugins/rpi_boot/rpi_boot.cgi Tue Apr 01 16:34:16 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -#!/bin/sh -# -# TazBerry CGI Plugin - Boot configs and options -# - -if [ "$(GET rpi_boot)" ]; then - html_header "Boot" - echo "

SliTaz Raspberry Pi Boot

" - - cat << EOT -

- The Raspberry Pi uses 2 config files to boot: cmdline.txt, config.txt -

- -
-
-Kernel boot parameters [ Edit ]
---------------------------------------------------------------------------------
-$(cat /boot/cmdline.txt 2>/dev/null)
-
-
-RPi configuration file [ Edit ]
---------------------------------------------------------------------------------
-$(cat /boot/config.txt 2>/dev/null)
-
-EOT
-	
-	html_footer
-	exit 0
-fi
diff -r ad712df5e748 -r d670034c1f00 rpi/cgi-adm/plugins/rpi_boot/rpi_boot.conf
--- a/rpi/cgi-adm/plugins/rpi_boot/rpi_boot.conf	Tue Apr 01 16:34:16 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-# TazBerry CGI Plugin configuration
-
-PLUGIN="RPi Boot"
-SHORT_DESC="Raspberry Pi boot time configs"
-MAINTAINER="pankso@slitaz.org"
-WEB_SITE="http://arm.slitaz.org/rpi/"
diff -r ad712df5e748 -r d670034c1f00 rpi/cgi-adm/plugins/rpi_config/rpi_config.cgi
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpi/cgi-adm/plugins/rpi_config/rpi_config.cgi	Tue Apr 01 23:09:04 2014 +0200
@@ -0,0 +1,75 @@
+#!/bin/sh
+#
+# TazBerry CGI Plugin - Boot configs and options
+#
+
+case " $(GET) " in
+
+	*\ rdate\ *)
+		html_header "System time"
+		echo "

System time

" + echo "
"
+		echo -n "Old date:"; date
+		rdate -s tick.greyware.com
+		echo -n "New date:"; date 
+		echo "
" + html_footer && exit 0 ;; + + *\ oclock\ *) + html_header "Overclocking" + cat << EOT +

RPi Overclocking

+ +
+$(/home/pankso/Projects/slitaz-arm/rpi/tazberry rpi_oclock)
+
+ +

Current settings:

+
+$(fgrep _freq /boot/config.txt)
+$(fgrep over_voltage /boot/config.txt)
+
+ +Edit boot configuration +EOT + html_footer && exit 0 ;; + + *\ rpi_config\ *) + html_header "Raspberry Pi" + echo "

SliTaz Raspberry Pi

" + + cat << EOT + +

+ Remotely configure your SliTaz Raspberry Pi device. +

+ +
+
+ + +
+
+ +

Kernel boot parameters

+

+ File path: /boot/cmdline.txt + [ Edit ] +

+
+$(cat /boot/cmdline.txt 2>/dev/null)
+
+ +

Boot configuration file

+

+ File path: /boot/config.txt + [ Edit ] +

+
+$(cat /boot/config.txt 2>/dev/null)
+
+ +EOT + + html_footer && exit 0 ;; +esac diff -r ad712df5e748 -r d670034c1f00 rpi/cgi-adm/plugins/rpi_config/rpi_config.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rpi/cgi-adm/plugins/rpi_config/rpi_config.conf Tue Apr 01 23:09:04 2014 +0200 @@ -0,0 +1,6 @@ +# TazBerry CGI Plugin configuration + +PLUGIN="Raspberry Pi config" +SHORT_DESC="Raspberry Pi hardware/boot configuration" +MAINTAINER="pankso@slitaz.org" +WEB_SITE="http://arm.slitaz.org/rpi/" diff -r ad712df5e748 -r d670034c1f00 rpi/rootfs/boot/config.txt --- a/rpi/rootfs/boot/config.txt Tue Apr 01 16:34:16 2014 +0200 +++ b/rpi/rootfs/boot/config.txt Tue Apr 01 23:09:04 2014 +0200 @@ -1,1 +1,24 @@ +# /boot/config.txt: SliTaz Raspberry Pi boot configuration +# + +# Linux kernel image kernel=kernel.img + +# Overclocking Settings +arm_freq=700 +core_freq=250 +sdram_freq=400 +over_voltage=0 + +#GPU memory allocation in MB. Default: 64 +#gpu_mem=128 + +# Framebuffer Video. Depths: 8, 16, 24, 32 +#framebuffer_depth=32 + +# Overscan Video Settings +disable_overscan=0 +overscan_left=0 +overscan_right=0 +overscan_top=0 +overscan_bottom=0