|
From: <abe...@us...> - 2011-01-16 19:24:23
|
Revision: 4719
http://astlinux.svn.sourceforge.net/astlinux/?rev=4719&view=rev
Author: abelbeck
Date: 2011-01-16 19:24:16 +0000 (Sun, 16 Jan 2011)
Log Message:
-----------
Web interface, System tab, added 'RUNNIX Bootloader Upgrade' support
Modified Paths:
--------------
branches/0.7/package/webinterface/altweb/admin/system.php
branches/0.7/package/webinterface/altweb/common/license-astlinux.txt
branches/0.7/package/webinterface/altweb/common/license-packages.txt
branches/0.7/package/webinterface/altweb/common/version.php
Modified: branches/0.7/package/webinterface/altweb/admin/system.php
===================================================================
--- branches/0.7/package/webinterface/altweb/admin/system.php 2011-01-15 21:31:32 UTC (rev 4718)
+++ branches/0.7/package/webinterface/altweb/admin/system.php 2011-01-16 19:24:16 UTC (rev 4719)
@@ -1,6 +1,6 @@
<?php
-// Copyright (C) 2008-2010 Lonnie Abelbeck
+// Copyright (C) 2008-2011 Lonnie Abelbeck
// This is free software, licensed under the GNU General Public License
// version 3 as published by the Free Software Foundation; you can
// redistribute it and/or modify it under the terms of the GNU
@@ -16,6 +16,7 @@
// 04-25-2009, Added Restore Basic Configuration
// 12-12-2009, Added System Shutdown/Halt
// 02-01-2010, Added Asterisk Sounds upgrade, remove, show
+// 01-16-2011, Added runnix check, upgrade, show, revert
//
// System location of rc.conf file
$CONFFILE = '/etc/rc.conf';
@@ -325,6 +326,34 @@
header('Location: '.$myself.'?sounds_action='.$action.'&result='.$result);
exit;
}
+ } elseif (isset($_POST['runnix_submit'])) {
+ $result = 99;
+ $action = $_POST['runnix_action'];
+ if (isset($_POST['runnix_confirm'])) {
+ $file = '/usr/sbin/upgrade-RUNNIX-image';
+ $std_err = ' 2>/dev/null';
+ if ($action === 'upgrade') {
+ $result_str = @system($file.' '.$action.$std_err, $status);
+ putACTIONresult($result_str, $status);
+ exit;
+ } elseif ($action === 'show') {
+ $result_str = @system($file.' '.$action.$std_err, $status);
+ putACTIONresult($result_str, $status);
+ exit;
+ } elseif ($action === 'revert') {
+ $result_str = @system($file.' '.$action.$std_err, $status);
+ putACTIONresult($result_str, $status);
+ exit;
+ } elseif ($action === 'check') {
+ $result_str = @system($file.' '.$action.$std_err, $status);
+ putACTIONresult($result_str, $status);
+ exit;
+ }
+ } else {
+ $result = 7;
+ header('Location: '.$myself.'?runnix_action='.$action.'&result='.$result);
+ exit;
+ }
} elseif (isset($_FILES['restore'])) {
$result = 1;
$error = $_FILES['restore']['error'];
@@ -394,6 +423,12 @@
$sounds_action = 'upgrade';
}
+ if (isset($_GET['runnix_action'])) {
+ $runnix_action = $_GET['runnix_action'];
+ } else {
+ $runnix_action = 'check';
+ }
+
putHtml("<center>");
if (isset($_GET['result'])) {
$result = $_GET['result'];
@@ -653,7 +688,28 @@
putHtml('</td></tr>');
}
+if (is_file('/usr/sbin/upgrade-RUNNIX-image')) {
putHtml('<tr><td style="text-align: center;" colspan="2">');
+ putHtml('<h2>RUNNIX Bootloader Upgrade:</h2>');
+ putHtml('</td></tr><tr><td class="dialogText" style="text-align: center;" colspan="2">');
+ putHtml('<select name="runnix_action">');
+ $sel = ($runnix_action === 'check') ? ' selected="selected"' : '';
+ putHtml('<option value="check"'.$sel.'>Check for New</option>');
+ $sel = ($runnix_action === 'upgrade') ? ' selected="selected"' : '';
+ putHtml('<option value="upgrade"'.$sel.'>Upgrade with New</option>');
+ $sel = ($runnix_action === 'show') ? ' selected="selected"' : '';
+ putHtml('<option value="show"'.$sel.'>Show Installed</option>');
+ $sel = ($runnix_action === 'revert') ? ' selected="selected"' : '';
+ putHtml('<option value="revert"'.$sel.'>Revert to Previous</option>');
+ putHtml('</select>');
+ putHtml('–');
+ putHtml('<input type="submit" value="Runnix" name="runnix_submit" />');
+ putHtml('–');
+ putHtml('<input type="checkbox" value="runnix" name="runnix_confirm" /> Confirm');
+ putHtml('</td></tr>');
+}
+
+ putHtml('<tr><td style="text-align: center;" colspan="2">');
putHtml('<h2>System Shutdown/Halt:</h2>');
putHtml('</td></tr><tr><td class="dialogText" style="text-align: center;" colspan="2">');
putHtml('<input type="submit" value="Shutdown" name="submit_shutdown" />');
Modified: branches/0.7/package/webinterface/altweb/common/license-astlinux.txt
===================================================================
--- branches/0.7/package/webinterface/altweb/common/license-astlinux.txt 2011-01-15 21:31:32 UTC (rev 4718)
+++ branches/0.7/package/webinterface/altweb/common/license-astlinux.txt 2011-01-16 19:24:16 UTC (rev 4719)
@@ -1,4 +1,4 @@
-AstLinux is Copyright (c) 2004-2010 by Kristian Kielhofner.
+AstLinux is Copyright (c) 2004-2011 by Kristian Kielhofner.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Modified: branches/0.7/package/webinterface/altweb/common/license-packages.txt
===================================================================
--- branches/0.7/package/webinterface/altweb/common/license-packages.txt 2011-01-15 21:31:32 UTC (rev 4718)
+++ branches/0.7/package/webinterface/altweb/common/license-packages.txt 2011-01-16 19:24:16 UTC (rev 4719)
@@ -5,6 +5,7 @@
## 2) Automatically sorted by package name
## 3) Lines beginning with a '#' are treated as comments
##
+RUNNIX~Copyright (c) 2006-2011 by Kristian Kielhofner.
libSRTP~Copyright (c) 2001-2005 Cisco Systems, Inc. All rights reserved.
Web Interface~Copyright (c) 2008-2011 Lonnie Abelbeck.
Asterisk~Copyright (c) 1999-2010 Digium, Inc.
Modified: branches/0.7/package/webinterface/altweb/common/version.php
===================================================================
--- branches/0.7/package/webinterface/altweb/common/version.php 2011-01-15 21:31:32 UTC (rev 4718)
+++ branches/0.7/package/webinterface/altweb/common/version.php 2011-01-16 19:24:16 UTC (rev 4719)
@@ -1,6 +1,6 @@
<?php
// version.php for AstLinux Alternate Web Interface
-$GUI_VERSION = '1.7.11';
+$GUI_VERSION = '1.7.12';
?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|