diff --git a/CONTROL/control b/CONTROL/control index f0aa0d4..a65d867 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 1.0.0 +Version: 1.0.0-2 Architecture: mipsel Maintainer: af123@hummypkg.org.uk Depends: webif-channelicons(>=1.0.5),mongoose(>=3.0-7),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73-1),jim-cgi(>=0.7),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.13),hmt(>=1.1.13),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.1.2),smartmontools,tmenu(>=1.05),ffmpeg,id3v2 diff --git a/CONTROL/postinst b/CONTROL/postinst index 0141dcc..2a59572 100755 --- a/CONTROL/postinst +++ b/CONTROL/postinst @@ -39,5 +39,7 @@ if [ ! -f /mod/webif/.strip-updated ]; then touch /mod/webif/.strip-updated fi +/mod/webif/lib/bin/diskattrs + exit 0 diff --git a/var/mongoose/cgi-bin/settings.jim b/var/mongoose/cgi-bin/settings.jim index 84663a1..418842b 100755 --- a/var/mongoose/cgi-bin/settings.jim +++ b/var/mongoose/cgi-bin/settings.jim @@ -7,7 +7,8 @@ require settings.class plugin system.class httpheader if {[cgi_get act] eq "https"} { - if {[cgi_get val off] eq "off"} { + set val [cgi_get val off] + if {$val in {0 off}} { file delete /mod/etc/mongoose.cert puts "HTTPS Server will be disabled after next reboot." } else { @@ -18,7 +19,8 @@ if {[cgi_get act] eq "https"} { } if {[cgi_get act] eq "xtelnet"} { - if {[cgi_get val off] eq "off"} { + set val [cgi_get val off] + if {$val in {0 off}} { file delete /mod/boot/xtelnet puts "Telnet server expert mode will be disabled after next reboot." } else { @@ -37,6 +39,7 @@ set epg_style [$settings epg_style] set pkgdev [$settings pkgdev] set notoolbar [$settings notoolbar] set nomobile [$settings nomobile] +set nohelplinks [$settings nohelplinks] set xepghours [$settings xepghours] if {$xepghours == 0} { set xepghours 4 } set genrededup [$settings genrededup] @@ -80,6 +83,7 @@ handle_str_update epg_style $epg_style "EPG Type" handle_int_update pkgdev $pkgdev "Development Package Display" handle_int_update notoolbar $notoolbar "Disable toolbar" handle_int_update nomobile $nomobile "Disable mobile link" +handle_int_update nohelplinks $nohelplinks "Disable help links" handle_int_update genrededup $genrededup "Genre search dedup" handle_int_update autolog $autolog "Auto-processing log level" @@ -122,6 +126,22 @@ puts { } +proc setting_toggle {name attr checked {invert 0} {val 0}} { + puts -nonewline " +
| Show development and advanced packages? | -- | -
|---|---|
| Expert mode telnet server? | -- - | -
Please Wait...')
- .show('slow')
- .load('/cgi-bin/settings.jim?act=https&val=' + arg,
- function() {
- $('#https_toggle').enable();
- $('#https_output')
- .css('font-style', 'italic')
- .delay(2000).fadeOut('slow');
- });
- });
-
- $('#xtelnet_toggle').change(function() {
- var arg = 'off';
- if ($(this).attr('checked'))
- arg = 'on';
-
- $(this).disable();
-
- $('#xtelnet_output')
- .empty()
- .html('
Please Wait...')
- .show('slow')
- .load('/cgi-bin/settings.jim?act=xtelnet&val=' + arg,
- function() {
- $('#xtelnet_toggle').enable();
- $('#xtelnet_output')
- .css('font-style', 'italic')
- .delay(2000).fadeOut('slow');
- });
- });
-
- $('#toolbar_toggle').change(function() {
- var arg = '1';
- if ($(this).attr('checked'))
- arg = '0';
-
- $(this).disable();
-
- $('#toolbar_output')
+ $(output)
.empty()
.show('slow')
- .load('/cgi-bin/settings.jim?notoolbar=' + arg,
+ .load('/cgi-bin/settings.jim?' + urlargs,
function() {
- $('#toolbar_toggle').enable();
- $('#toolbar_output')
- .css('font-style', 'italic')
- .delay(2000).fadeOut('slow');
- });
- });
-
- $('#mobile_toggle').change(function() {
- var arg = '1';
- if ($(this).attr('checked'))
- arg = '0';
-
- $(this).disable();
-
- $('#mobile_output')
- .empty()
- .show('slow')
- .load('/cgi-bin/settings.jim?nomobile=' + arg,
- function() {
- $('#mobile_toggle').enable();
- $('#mobile_output')
- .css('font-style', 'italic')
- .delay(2000).fadeOut('slow');
- });
- });
-
- $('#genrededup_toggle').change(function() {
- var arg = '0';
- if ($(this).attr('checked'))
- arg = '1';
-
- $(this).disable();
-
- $('#genrededup_output')
- .empty()
- .show('slow')
- .load('/cgi-bin/settings.jim?genrededup=' + arg,
- function() {
- $('#genrededup_toggle').enable();
- $('#genrededup_output')
+ $(el).enable();
+ $(output)
.css('font-style', 'italic')
.delay(2000).fadeOut('slow');
});
diff --git a/var/mongoose/include/diskcheck.jim b/var/mongoose/include/diskcheck.jim
index 5bdee59..81d3fde 100755
--- a/var/mongoose/include/diskcheck.jim
+++ b/var/mongoose/include/diskcheck.jim
@@ -1,6 +1,10 @@
#!/mod/bin/jimsh
source /mod/webif/lib/setup
+require system.class
+
+if {[system model] eq "HDR"} {
+
require settings.class
set smartattrs {realloc pending offline}
@@ -58,8 +62,11 @@ this device.
} else {
puts "