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

nrvr.distros.el.util - Utilities for manipulating Ubuntu
 
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
re

 
Classes
       
nrvr.distros.common.util.LinuxUtil
UbUtil

 
class UbUtil(nrvr.distros.common.util.LinuxUtil)
    Utilities for manipulating an Ubuntu installation.
 
  Class methods defined here:
ubCommandToDisableAutoLogin(cls) from __builtin__.classobj
Build command to disable auto-login with LightDM.
 
Must be root to succeed.
 
Return command to disable auto-login with LightDM.
ubCommandToDisableGuestLogin(cls) from __builtin__.classobj
Build command to disable guest login with LightDM.
 
Must be root to succeed.
 
Return command to disable guest login with LightDM.
ubCommandToEnableAutoLogin(cls, username=None) from __builtin__.classobj
Build command to enable auto-login with LightDM.
 
Must be root to succeed.
 
username
    defaults to None, which effects disabling auto-login.
 
Return command to enable auto-login with LightDM.
ubCommandToEnableGuestLogin(cls) from __builtin__.classobj
Build command to enable guest login with LightDM.
 
Must be root to succeed.
 
Return command to enable guest login with LightDM.
ubCommandToOpenFirewallPort(cls, port) from __builtin__.classobj
Build command to open a firewall TCP port.
 
Must be root to succeed.
 
As implemented does not check whether firewall is enabled.
 
Return command to open a firewall TCP port.
ubReleaseVersion(cls, isoImagePath) from __builtin__.classobj
Return release version from isoImagePath.

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.