From 8d0a1f08a8a2c25b241b31aa6ed213869efda1c6 Mon Sep 17 00:00:00 2001 From: freesource Date: Sun, 23 Dec 2001 20:39:16 +0000 Subject: [PATCH] Added halt and reboot to the mconsole interface as well as a convenience .. buttons can be used as well. --- BootRoot/BootRoot.pm | 45 ++++++++++++++++++++++++++++++++++++++++++-- doc/html/index.html | 6 ++++-- 2 files changed, 47 insertions(+), 4 deletions(-) diff --git a/BootRoot/BootRoot.pm b/BootRoot/BootRoot.pm index bbabc46..637bc02 100644 --- a/BootRoot/BootRoot.pm +++ b/BootRoot/BootRoot.pm @@ -1350,6 +1350,7 @@ sub uml_box { $tooltips->set_tip( $eab4, "Pass commands to the mconsole.\n" . "sysrq [0-9|b|e|i|l|m|p|r|s|t|u] " . + " reboot halt " . " config = remove " . " switch version help", "" ); @@ -1381,8 +1382,9 @@ sub uml_box { } } - + + # version if ( $entry_advanced[14] && $entry_advanced[14] =~ m,version, ) { @@ -1403,6 +1405,45 @@ sub uml_box { } + + # reboot + if ( $entry_advanced[14] && + $entry_advanced[14] =~ m,reboot, ) { + for my $co (0 .. $#command_parts ) { + if ( $command_parts[$co] eq + "reboot" + ) + { + system + "uml_mconsole " . + "/tmp/uml/$umid/mconsole" . + " reboot&"; + + } + + } + + } + + # halt + if ( $entry_advanced[14] && + $entry_advanced[14] =~ m,halt, ) { + for my $co (0 .. $#command_parts ) { + if ( $command_parts[$co] eq + "halt" + ) + { + system + "uml_mconsole " . + "/tmp/uml/$umid/mconsole" . + " halt&"; + + } + + } + + } + # sysrq if ( $entry_advanced[14] && $entry_advanced[14] =~ m,sysrq, ) { @@ -1413,7 +1454,7 @@ sub uml_box { { if ( !$command_parts[$co + 1] || $command_parts[$co + 1] =~ - m,^[0-9]{n}$ | ^b$ | ^e$ | ^i$ | ^l$ | + m,^[0-9]{1}$ | ^b$ | ^e$ | ^i$ | ^l$ | ^m$ | ^p$ | ^r$ | ^s$ | ^t$ | ^u$,x ) { system "uml_mconsole " . diff --git a/doc/html/index.html b/doc/html/index.html index 4ea9c51..7786bf2 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -3,7 +3,7 @@ -
$Id: index.html,v 1.56 2001/12/23 18:05:22 freesource Exp $
+
$Id: index.html,v 1.57 2001/12/23 20:28:00 freesource Exp $

@@ -257,8 +257,10 @@ with the umid value.  Good information about sysrq is found in Documentation/sysrq.txt in the Linux sources.

-  sysrq (Shows option values in virtual machine.)
+  sysrq (Shows sysrq option values in virtual machine.)
   sysrq [0-9|b|e|i|l|m|p|r|s|t|u]
+  reboot
+  halt
   config <dev>=<config> 
   remove <dev>
   switch <umid>