diff --git a/xCAT-web/cmds/grpattr b/xCAT-web/cmds/grpattr index fc1899679..3eb0c593c 100644 --- a/xCAT-web/cmds/grpattr +++ b/xCAT-web/cmds/grpattr @@ -13,7 +13,7 @@ if ($::opt_h) { usage(0); } #$::VERBOSE = $::opt_v; # Get the status of each node and save in a hash -my @ns = runcmd("/opt/xcat/bin/nodestat '/[A-Za-z].*'"); +my @ns = runcmd("nodestat '/.*'"); my %nodestat; foreach my $line (@ns) { my ($node, $stat) = split(/[:\s]+/, $line); @@ -24,7 +24,7 @@ if ($::opt_v) { foreach my $n (keys %nodestat) { print "$n: $nodestat{$n}\n"; } # Get the list of nodes/groups and aggregate the status of the group using the status of each node #TODO: this must be changed for xcat 2.0 -my @nodelist = runcmd("egrep '^[A-Za-z]' /opt/xcat/etc/nodelist.tab"); +my @nodelist = runcmd("egrep '^[A-Za-z]' $ENV{XCATROOT}/etc/nodelist.tab"); verbose("Found ", scalar(@nodelist), " items in nodelist.tab\n"); my %groups; foreach my $line (@nodelist) { diff --git a/xCAT-web/css/xcat.css b/xCAT-web/css/xcat.css deleted file mode 100644 index 046b466cf..000000000 --- a/xCAT-web/css/xcat.css +++ /dev/null @@ -1,155 +0,0 @@ -#content .block { - width: 400px; - height: 350px; - position: absolute; - overflow: hidden; - left: 287px; - top: 183px; -} - - -#content .block h3 { - margin: 0; - padding: 5px; - font-size: 14px; - color: #fff; - background-color: #2153AA; -} - - - -#content .block .block-toggle { - background-image: url('http://wopr.dfw.ibm.com/xcat/images/close2.gif'); - display: block; - float: right; - width: 14px; - height: 14px; - background-repeat: no-repeat; - background-position: center; - cursor: pointer; -} - - -#content .block .block-close { - background-image: url('http://wopr.dfw.ibm.com/xcat/images/close2.gif'); - display: block; - float: right; - width: 14px; - height: 14px; - background-repeat: no-repeat; - background-position: center; - cursor: pointer; -} - -#content .handle { - cursor: move; - -} - -#content .block .block-toggle span { - display: none; -} - - -#content .blockContent { - width: 400px; - height: 330px; - border: 0px; - padding: 0px; - background: #ffffee; - position: relative; - border: 1px dotted #2153AA; -} - -#content .blockColumn1{ - width: 200px; - padding: 0 0 0 0; - height: 330px; - position: relative; - float: left; -} - - -#content .blockColumn2{ - width: 200px; - height: 330px; - padding: 0 0 0 0; - position: relative; - float: left; - left: 201px; -} - - -#content .blockColumnHeader { - background: #aaa; - width: 200px; - margin: 0 0 0 0; - height: 20px; - font-weight: bold; - font-size: 16px; - color: #666; - padding-left: 5px; - text-align: center; - position: absolute; - bottom: 300px; -} - - -#content .floatPaneColumnContent1 { - overflow-y: auto; - width: 200px; - height: 290px; - position: absolute; - bottom: 10px; - -} - -#content .floatPaneColumnContent2 { - width: 200px; - height: 290px; - position: absolute; - bottom: 10px; -} - -/* Command Window */ -#content .cmd { - width: 400px; - height: 350px; - background: #bbb; - position: relative; - overflow: hidden; - left: 30%; - top: 40px; -} - - -#content .cmdLine { - text-align: center; - font-size: 14px; - font-weight: bold; - padding: 0 0 0 0; -} - -#content .cmdContainer { - overflow-y: auto; - padding: 0 0 0 0; - width: 400px; - height: 300px; -} - -#content .ListLine0 { - background: #e0f8f8; - padding-left: 10px; - width: 390px; -} -#content .ListLine1 { - background: #b0f8f8; - padding-left: 10px; - width: 390px; -} - -.pageScroll { - width: 400px; - height: 330px; - overflow: scroll; -} diff --git a/xCAT-web/css/xcattop.css b/xCAT-web/css/xcattop.css deleted file mode 100644 index 07c703316..000000000 --- a/xCAT-web/css/xcattop.css +++ /dev/null @@ -1,132 +0,0 @@ -.grid { - background: #fff; - border: 1px solid #eee; - /* width: boxWidth ?>px; */ - text-align: center; - height: 400px; - padding: 2px 2px 2px 2px; - margin: 2px 40px 2px 2px; - -} - -.offLineNode { - background: #aaa; - color: #444; - width: 80px; - height: 20px; - margin: 2px; - font-family: arial; - font-size: 10px; - text-align: center; - overflow: hidden; - float: left; -} - -.pingableNode { - background: #66CC99; - color: #444; - width: 80px; - height: 20px; - margin: 2px; - font-family: arial; - font-size: 10px; - text-align: center; - overflow: hidden; - float: left; -} - -.legendBox { - padding: 2px 2px 2px 2px; - margin-left: 10px; - margin-top: 5px; - margin-bottom: 10px; - border: 2px solid #eee; - position: relative; - width: 800px; - text-align: center; - float: left; - -} -.mHead { - - font-family: arial; - -} -.subBox { - border: 1px solid #eee; - margin-left: 20px; - margin-right: 20px; - width: 100px; - height: 20px; -} - -.legendDescription { - font-size: 10px; - font-family: arial; - color: #999; -} -.unknown { - background: #aaa; - height: 20px; - width: 40px; -} -.pingable { - background: #66CC99; - height: 20px; - width: 40px; -} - -.online { - background: #6699CC; - height: 20px; - width: 40px; -} - -/* grid stuff */ -#box { - position: relative; - top: 50px; - left: 20px; -} -#boxNav { - position: relative; - left: 0px; - top: 100px; - - -} - -#boxNavPrev { - position: absolute; - top: 75px; - left: 5px; - z-index: 100; -} - -#boxNavNext { - position: absolute; - top: 75px; - right: 5px; - z-index: 100; -} - -#boxMotionContainer { - margin: 0pt 30px; - padding: 0px; - overflow: hidden; - position: relative; -} - -#boxMovingGallery { - position: relative; -} - -.boxNav { - padding: 0 0 0 0; - margin: 0 0 0 0; - position: absolute; - text-align: center; - top: 0px; - left: 0px; -} - diff --git a/xCAT-web/lib/functions.php b/xCAT-web/lib/functions.php index 98f64a008..7fcd2c3cf 100644 --- a/xCAT-web/lib/functions.php +++ b/xCAT-web/lib/functions.php @@ -38,19 +38,6 @@ echo << \n"; - -//echo "\n"; -//echo "\n"; -//echo "\n"; - -//echo "\n"; -//echo "\n"; - -//echo "\n"; -//echo "\n"; - if ($stylesheets) { foreach ($stylesheets as $s) { @@ -218,7 +205,7 @@ function runcmd ($cmd, $mode, &$output, $options=NULL){ //Set error output to the same source as standard output (on Linux) if (strstr($cmd,'2>&1') == FALSE && !$options["NoRedirectStdErr"]) { $cmd .= ' 2>&1'; } - if (!isSupported('ClientServer')) { $cmd = "/bin/sudo $cmd"; } + if (!isSupported('ClientServer')) { $cmd = "/usr/bin/sudo $cmd"; } //todo: add support for xcat 2 $ret_stat = ""; diff --git a/xCAT-web/lib/phpinfo.php b/xCAT-web/lib/phpinfo.php index 00aa6aca0..16410ee93 100644 --- a/xCAT-web/lib/phpinfo.php +++ b/xCAT-web/lib/phpinfo.php @@ -1,4 +1,13 @@ \n"; +runcmd('echo $PATH', 1, $junk); +runcmd('whoami', 1, $junk); +echo "
line=$line
{$_REQUEST['command']},"; foreach ($_COOKIE['history'] as $h) { echo "$h,"; }; echo "
" . isset($_COOKIE['history']) . ',' . array_search($_REQUEST['command'], $_COOKIE['history']) . "