nrvr.distros.el.util
index
/usr/lib/python2.7/site-packages/nrvr/distros/el/util.py

nrvr.distros.el.util - Utilities for manipulating Enterprise Linux
 
Class provided by this module is ElUtil.
 
Idea and first implementation - Leo Baschy <srguiwiz12 AT nrvr DOT com>
 
Public repository - https://github.com/srguiwiz/nrvr-commander
 
Copyright (c) Nirvana Research 2006-2015.
Simplified BSD License

 
Modules
       
nrvr

 
Classes
       
nrvr.distros.common.util.LinuxUtil
ElUtil

 
class ElUtil(nrvr.distros.common.util.LinuxUtil)
    Utilities for manipulating an Enterprise Linux installation.
 
  Class methods defined here:
elCommandToOpenFirewallPort(cls, port) from __builtin__.classobj
Build command to open a firewall port.
 
Only if not recognizably open yet.
 
As implemented copies /etc/sysconfig/iptables line containing --dport 22 .
 
Must be root to succeed.
 
Return command to open a firewall port.

Class methods inherited from nrvr.distros.common.util.LinuxUtil:
commandToAppendAddressNameLineToEtcHosts(cls, ipaddress, name) from __builtin__.classobj
Build command to append an ipaddress hostname line to /etc/hosts.
 
Only if no line yet.
As implemented any fgrep match of name in /etc/hosts prevents addition.
 
Must be root to succeed.
 
Return command to append an ipaddress hostname line to /etc/hosts.
commandToEnableSudo(cls, username=None) from __builtin__.classobj
Build command to enable sudo.
 
As implemented in /etc/sudoers duplicates any (presumably only one) line
starting with "root " and replaces "root" with the username.
 
Must be root to succeed.
 
Return command to enable sudo.
commandToWaitForNetworkDevice(cls, device='eth0', maxSeconds='100') from __builtin__.classobj
Build command to wait for a network device to connect.
 
Only waits if not connected yet.
 
As implemented depends on NetworkManager tabular mode outputting "connected".
 
Need not be root to succeed.
 
device
    e.g. "eth0".
 
maxSeconds
    maximum number of seconds to wait.
 
Return command to wait for a network device to connect.