NOCpulse::CommandShell man page on Fedora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Fedora logo
[printable version]

CommandShell(3)	      User Contributed Perl Documentation      CommandShell(3)

NAME
       NOCpulse::CommandShell - an abstract definition of a command shell
       interface

SYNOPSIS
	package NOCpulse::SSHRemoteCommandShell;
	use NOCpulse::CommandShell;
	@ISA=qw(NOCpulse::CommandShell);

	sub overview {
	   return "This component give shell based probes access to a command shell via an SSH connection"
	}

	sub registerSwitches
	{
	       my $self = shift();
	       $self->SUPER::registerSwitches;
	       $self->addSwitch('sshuser','=s','1','nobody','Name of the user to log in as');
	       $self->addSwitch('sshhost','=s','1','localhost','Host to log into');
	}

	sub initialize
	{
	       my $self = shift();
	       $self->SUPER::initialize(shift());
	       if ($self->switchesAreValid) {
		       $user = $self->switchValue('sshuser');
		       $host= $self->switchValue('sshhost');
		       $self->set_shellCommand('/usr/bin/ssh');
		       $self->set_shellSwitches('-l', $user,
			      '-p','4545',
			      '-i','%/var/lib/nocpulse/.ssh/nocpulse-identity',
			      '-o','BatchMode=yes',
			      $host,
			      '/bin/sh -s');
	       }
	       return $self;
	}

DESCRIPTION
       NOCpulse::CommandShell is a subclass of CommandLineApplicationComponent
       that defines a framework for describing access to a command shell.  By
       itself it knows nothing - you must subclass it for it to be useful
       (examples include NOCpulse::LocalCommandShell and
       NOCpulse::SSHRemoteCommandShell).

REQUIRES
       Perl 5.004,  CommandLineApplicationComponent, IPC::Open3

INSTANCE METHODS
       instVarDefinitions()
	   Defines the following:

	   shellCommand - the program that gets executed in order to obtain
	   the shell

	   shellSwitches - switches to the shell command

	   probeCommands - the command(s) that the user of the Command Shell
	   wants to run

	   probeSwitches - (deprecated)

	   stdout - contains the stdout of the probeCommands after execution

	   stderr - contains the stderr of the probeCommands after execution

	   exit - the exit level of the probeCommands after execution

       initialize()
       execute()
	   Executes probeCommands by passing them into the stdin of
	   shellCommand (where shellCommand is executed with shellSwitches).
	   It captures all stdout and stderr to their corresponding instance
	   variables, and sets the exit instance variable to the exit status
	   of probeCommands.

	   Both stdout and stderr will contain one string with zero or more
	   newlines.

       set_shellSwitches(<@switchList>)
	   Sets shellSwitches to the array of switches passed in.  (Overrides
	   normal Object set_xxx behavior)

       set_probeSwitches(<@switchList>)
	   deprecated - don't use

       get_shellSwitches()
	   Returns the	shellSwitches array of switches.  (Overrides normal
	   Object set_xxx behavior)

       get_probeSwitches()
	   deprecated - don't use

perl v5.14.0			  2009-02-19		       CommandShell(3)
[top]

List of man pages available for Fedora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net