|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.jsdt.support.SupportHelper
com.ibm.jsdt.support.SupportLinuxHelper
public class SupportLinuxHelper
Linux specific helper functionality.
Field Summary | |
---|---|
static java.lang.String |
sNEWLN
Deprecated. |
Fields inherited from class com.ibm.jsdt.support.SupportHelper |
---|
theSupportBase |
Constructor Summary | |
---|---|
SupportLinuxHelper()
Deprecated. Sole constructor. |
Method Summary | |
---|---|
boolean |
addGroup(SupportBase s)
Deprecated. Creates a new user ID group. |
boolean |
addLinuxUser(SupportBase s)
Deprecated. Creates a new user ID using the Linux system's native password hashing/encryption algorithim and creates the /home/ |
boolean |
addUser(SupportBase s)
Deprecated. Creates a new user ID. |
boolean |
addUserToGroup(SupportBase s)
Deprecated. Adds a user to a group. |
void |
chmodDirPermissions(SupportBase s)
Deprecated. Changes the permissions on a folder. |
void |
chmodFilePermissions(SupportBase s)
Deprecated. Changes the permissions on a file. |
boolean |
doesGroupExist(SupportBase s)
Deprecated. Verifies the existence of a user group. |
boolean |
doesUserExist(SupportBase s)
Deprecated. Verifies the existence of a user ID. |
int |
doUserAdd(SupportBase s)
Deprecated. Adds a user to the Linux system by using the useradd command. |
java.lang.String |
getDeviceNameFromMountPoint(SupportBase s)
Deprecated. Gets the device name, given a mount point on Linux. |
int |
invokeCommandAsUserLogOutput(java.lang.String command,
java.lang.String commandToLog,
java.lang.String userID)
Deprecated. Builds the appropriate command string and calls super invokeCommandLogOutput(), which logs the commandToLog string, processes the command that the user specified, and waits for it to finish. |
int |
isAllRPMsInstalled(SupportBase s)
Deprecated. Inclusively checks for a set of RPMs. |
int |
isAnyRPMsInstalled(SupportBase s)
Deprecated. Noninclusively checks for a set of RPMs. |
boolean |
isIntelBasedLinux(SupportBase s)
Deprecated. Indicates whether the current architecture is Intel-based Linux. |
boolean |
isPowerLinux(SupportBase s)
Deprecated. Indicates whether the current architecture is Linux on POWER. |
boolean |
isRHEL4()
Deprecated. Determine if the target computer is running Red Hat Enterprise Linux release 4. |
boolean |
isRHEL5()
Deprecated. Determine if target system is Red Hat Enterprise Linux release 5. |
boolean |
isRootUser()
Deprecated. Returns true if the current user is a root user. |
boolean |
isRpmInstalled(SupportBase s)
Deprecated. Checks to see if a specific RPM package is installed. |
boolean |
isSLES10()
Deprecated. Check if target system is SUSE Linux Enterprise Server 10 return true if the current version of Linux is SLES 9, else returns false. |
boolean |
isSLES9()
Deprecated. Check if target system is SUSE Linux Enterprise Server 9 return true if the current version of Linux is SLES 9, else returns false. |
boolean |
isUserAndPasswordValid(SupportBase s)
Deprecated. Verifies if the given user and password are valid. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String sNEWLN
Constructor Detail |
---|
public SupportLinuxHelper()
Method Detail |
---|
public boolean doesUserExist(SupportBase s)
The SupportBase
to be queried must call
SupportBase.setUserName
before calling this method.
s
- the SupportBase
to be queriedSupportBase.getUserName
boolean
true
if found
false
all elsepublic boolean addUser(SupportBase s)
The SupportBase
to be queried must call
SupportBase.setUserName
,
SupportBase.setPassword
, and
SupportBase.setGroupName
before calling this method.
s
- the SupportBase
to be queriedSupportBase.getUserName
SupportBase.getPassword
SupportBase.getGroupName
boolean
true
if successfully created
false
all elsepublic boolean addLinuxUser(SupportBase s)
The SupportBase
to be queried must call
SupportBase.setUserName
,
SupportBase.setPassword
, and
s
- the SupportBase
to be queriedSupportBase.getUserName
SupportBase.getPassword
boolean
true
if successfully created
false
all elsepublic boolean doesGroupExist(SupportBase s)
The SupportBase
to be queried must call
SupportBase.setGroupName
before calling this method.
s
- the SupportBase
to be queriedSupportBase.getGroupName
boolean
true
if found
false
all elsepublic boolean addGroup(SupportBase s)
The SupportBase
to be queried must call
SupportBase.setGroupName
before calling this method.
s
- the SupportBase
to be queriedString
Linux group name SupportBase.getGroupName
boolean
true
if found
false
all elsepublic boolean addUserToGroup(SupportBase s)
The SupportBase
to be queried must call
SupportBase.setUserName
and
SupportBase.setGroupName
before calling this method.
s
- the SupportBase
to be queriedString
Linux group name SupportBase.getGroupName
String
user name SupportBase.getUsername
boolean
true
if found
false
all elsepublic int isAllRPMsInstalled(SupportBase s)
Do not use suffixes on the RPM name, such as ".i386.rpm".
For example, the RPM file db2rte71-7.1.0-0.i386.rpm would have the following valid names:
db2rte71 and db2rte71-7.1.0-0
And the following names would not be valid:
db2rte71-7.1.0-0.i386 and db2rte71-7.1.0-0.i386.rpm
The SupportBase
to be queried must call
SupportBase.setRPMArray
before calling this method.
s
- the SupportBase
to be queriedObjects[]
array of RPM package names SupportBase.getRPMArray
int
public int isAnyRPMsInstalled(SupportBase s)
Do not use suffixes on the RPM name, such as ".i386.rpm".
For example, the RPM file db2rte71-7.1.0-0.i386.rpm would have the following valid names:
db2rte71 and db2rte71-7.1.0-0
And the following names would not be valid:
db2rte71-7.1.0-0.i386 and db2rte71-7.1.0-0.i386.rpm
The SupportBase
to be queried must call
SupportBase.setRPMArray
before calling this method.
s
- the SupportBase
to be queriedSupportBase.getRPMArray
int
public boolean isRpmInstalled(SupportBase s)
The SupportBase
to be queried must call
SupportBase.setRPMPackage
before calling this method.
s
- the SupportBase
to be queriedString
of an RPM package name SupportBase.getRpmPackage
boolean
true
if it is installed
false
otherwisepublic void chmodDirPermissions(SupportBase s)
The SupportBase
to be queried must call
SupportBase.setPath
and SupportBase.setChmodValue
before calling this method.
s
- the SupportBase
to be queriedString
path SupportBase.getPath
String
valid chmod argument SupportBase.getChmodValue
public void chmodFilePermissions(SupportBase s)
The SupportBase
to be queried must call
SupportBase.setFileName
and SupportBase.setChmodValue
before calling this method.
s
- the SupportBase
to be queriedString
file name SupportBase.getFileName
String
valid chmod argument SupportBase.getChmodValue
public boolean isRootUser()
public boolean isUserAndPasswordValid(SupportBase s)
This will not work with releases prior to IR 2.1.0.0 and
IIA "agent version" prior to 3.1.0.0 . A value
of true
is returned when run
on a back level IIA.
The SupportBase
to be queried must call
SupportBase.setUserName
and SupportBase.setPassword
before calling this method. This method works for shadow passwords
and the older, less secure UNIX password storage mechanism.
Note: If the target machine uses DES password encryption, it is possible that
a password match could occur even if the passwords do not completely match. This
is a limitation of DES encryption. DES only matches the first 8 characters. If
the root password is "passw0rd", "passw0rd1" will be accepted because the first
8 characters match. A machine with DES password encryption would accept "password1"
as a valid root password.
s
- the SupportBase
to be queriedSupportBase.getUserName
SupportBase.getPassword
boolean
true
if found
false
all elsepublic boolean isIntelBasedLinux(SupportBase s)
s
- the SupportBase
to be queried boolean
public boolean isPowerLinux(SupportBase s)
s
- the SupportBase
to be queried boolean
public int doUserAdd(SupportBase s)
Example command: useradd -m -d /home/db2inst2 -p encPwd db2inst2
The SupportBase
to be queried must invoke
SupportBase.setUserName
and
SupportBase.setPassword
.
This method can only be called with local deployments
or on remote computers running IBM Installation Agents
with a specification version of 2.1.1.0 or later.
If a down-level agent is encountered, a value of
Integer.MIN_VALUE
(-2147483648) is returned.
int
the return code from the useradd
call.public java.lang.String getDeviceNameFromMountPoint(SupportBase s)
SupportBase
to be queried must call
SupportBase.setPath
before calling this method.
code
- SupportBase
String
public boolean isRHEL4()
public boolean isSLES9()
public boolean isSLES10()
public int invokeCommandAsUserLogOutput(java.lang.String command, java.lang.String commandToLog, java.lang.String userID)
The string “su -
All output is logged to the default log file specified in the
application wrapper or the Support
command
- -
The command string to run.commandToLog
- -
The command string to write to the deployment wizard log.
public boolean isRHEL5()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |