From 14379fd1a60058d2e4c050e9feefe756ba5c0276 Mon Sep 17 00:00:00 2001 From: immarvin Date: Fri, 31 Aug 2012 03:27:06 +0000 Subject: [PATCH] remove xcatosdistro, use xcatclientnr git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13675 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/bin/xcatosdistro | 58 ------------------------------------ 1 file changed, 58 deletions(-) delete mode 100755 xCAT-client/bin/xcatosdistro diff --git a/xCAT-client/bin/xcatosdistro b/xCAT-client/bin/xcatosdistro deleted file mode 100755 index bd2b06f2e..000000000 --- a/xCAT-client/bin/xcatosdistro +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env perl -# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html - -# Used as a standard client cmd that can be used for many of the xcat cmds. -# It grabs the arguments, noderange, and stdin and then submits the request to -# xcatd and waits for responses. Most of the client/server communication is -# contained in Client.pm. - -# To use this, sym link your cmd name to this script. - -BEGIN { $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : -d '/opt/xcat' ? '/opt/xcat' : '/usr'; } -use lib "$::XCATROOT/lib/perl"; -use Cwd; -#use IO::Socket::SSL; -#use IO::Socket::INET; -use File::Basename; -#use Data::Dumper; -use xCAT::Client; -use strict; -my $bname = basename($0); -my $cmdref; -if ($bname =~ /xcatosdistro/) { $cmdref->{command}->[0]=shift @ARGV; } # xcatclient was invoked directly and the 1st arg is cmd name that is used to locate the plugin -else { $cmdref->{command}->[0] = $bname; } # the cmd was sym linked to xcatclient -$cmdref->{cwd}->[0] = cwd(); - -my $data; -# allows our plugins to get the stdin of the cmd that invoked the plugin -if ( (($^O =~ /^linux/i) && ($ENV{'SHELL'} =~ /\/ksh$/)) || !defined($ENV{'TERM'}) ) -{ - my $rin=""; - my $rout; - vec($rin,fileno(STDIN),1)=1; - my $nfound=select($rout=$rin,"","",1); - if ($nfound) - { - while ( ) { $data.=$_; } - $cmdref->{stdin}->[0]=$data; - } -} -else -{ - if (-p STDIN) { - while ( ) { $data.=$_; } - $cmdref->{stdin}->[0]=$data; - } -} - - - -push (@{$cmdref->{arg}}, @ARGV); -foreach (keys %ENV) { - if (/^XCAT_/) { - $cmdref->{environment}->{$_} = $ENV{$_}; - } -} - -xCAT::Client::submit_request($cmdref,\&xCAT::Client::handle_response); -exit $xCAT::Client::EXITCODE;