mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-12 08:10:12 +00:00
delete change policy table by xcat
This commit is contained in:
@ -12,6 +12,7 @@ use strict;
|
||||
use warnings "all";
|
||||
use xCAT::Table;
|
||||
use xCAT::Utils;
|
||||
use xCAT::NodeRange;
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
@ -38,8 +39,16 @@ sub process_request {
|
||||
}
|
||||
|
||||
sub update_hw_inv {
|
||||
my $request = shift;
|
||||
my $node = $request->{'_xcat_clienthost'}->[0];
|
||||
my $request = shift;
|
||||
my $tmp_node = $request->{'_xcat_clienthost'}->[0];
|
||||
my @valid_node = xCAT::NodeRange::noderange($tmp_node);
|
||||
|
||||
unless (@valid_node) {
|
||||
xCAT::MsgUtils->message("S", "xcat.hwinv: Received invalid node $tmp_node hwinv info, ignore...");
|
||||
return;
|
||||
}
|
||||
|
||||
my $node = $valid_node[0];
|
||||
|
||||
my @nodefs;
|
||||
my $basicdata;
|
||||
|
@ -1360,8 +1360,6 @@ sub initDB
|
||||
"$::XCATROOT/sbin/chtab priority=4.8 policy.commands=litetree policy.rule=allow;";
|
||||
$chtabcmds .=
|
||||
"$::XCATROOT/sbin/chtab priority=4.9 policy.commands=getadapter policy.rule=allow;";
|
||||
$chtabcmds .=
|
||||
"$::XCATROOT/sbin/chtab priority=4.10 policy.commands=updatehwinv policy.rule=allow;";
|
||||
}
|
||||
my $outref = xCAT::Utils->runcmd("$chtabcmds", 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
|
@ -28,6 +28,11 @@ rm -f $xml_file
|
||||
|
||||
while [ ! -f $xml_file ] || grep error $xml_file; do
|
||||
if [ -f $xml_file ]; then
|
||||
if grep "Permission denied for request" $xml_file; then
|
||||
echo -en "Please run 'chtab priority=4.10 policy.commands=updatehwinv policy.rule=allow' to allow 'updatehwinv' command \r";
|
||||
rm $tmp_file
|
||||
exit 1
|
||||
fi
|
||||
timer=60
|
||||
while [ $timer -gt 0 ]; do
|
||||
sleep 1
|
||||
|
Reference in New Issue
Block a user