|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.izforge.izpack.util.os.unix.UnixHelper
public class UnixHelper
Helper Methods for unix-systems and derived.
| Field Summary | |
|---|---|
static java.lang.String |
VERSION
|
static java.lang.String |
whichCommand
whichCommand = "/usr/bin/which" or /bin/which |
| Constructor Summary | |
|---|---|
UnixHelper()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
getCpCommand()
Gets the absolute path of the cp (Copy) command. |
static java.lang.String |
getCustomCommand(java.lang.String aCommand)
Gets the absolute Pathe to the given custom command. |
static java.util.ArrayList<java.lang.String> |
getEtcPasswdArray()
Get the lines from /etc/passwd as Array |
static java.lang.String |
getRmCommand()
Gets the absolute Pathe to the rm (Remove) Command. |
static java.lang.String |
getSuCommand()
Gets the absolute path to the su (SuperUser) command. |
static java.lang.String |
getWhichCommand()
Gets the absolute path of the which command. |
static java.lang.String |
getYpCatCommand()
Gets the absolute Pathe to the ypcat (YellowPage/NIS Cat) Command. |
static java.util.ArrayList<java.lang.String> |
getYpPasswdArray()
Get the YelloyPages (NIS) Users lines from ypcat passwd as Array. |
static boolean |
kdeIsInstalled()
Test if KDE is installed. |
static void |
main(java.lang.String[] args)
Standalone Test Main Method call with : > java -cp ../_build com.izforge.izpack.util.os.unix.UnixHelper |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String whichCommand
public static final java.lang.String VERSION
| Constructor Detail |
|---|
public UnixHelper()
| Method Detail |
|---|
public static java.util.ArrayList<java.lang.String> getEtcPasswdArray()
public static java.util.ArrayList<java.lang.String> getYpPasswdArray()
ypcat passwd as Array. Ypcat
passwd's output has the same format as the the local /etc/passwd. Because there can be
thousands of yp-users and this query is net-based, this is a candidate for a token-based
optimization.
public static boolean kdeIsInstalled()
$>/usr/bin/env kwin --version This
assumes that kwin, the window Manager, as part of the kde-base package is already installed.
If this returns with 0 kwin resp. kde means to be installed,
public static java.lang.String getWhichCommand()
public static java.lang.String getCpCommand()
public static java.lang.String getSuCommand()
public static java.lang.String getRmCommand()
public static java.lang.String getYpCatCommand()
public static java.lang.String getCustomCommand(java.lang.String aCommand)
aCommand - a Custom Command
public static void main(java.lang.String[] args)
args - commandline args
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||