| java.lang.Object com.izforge.izpack.util.os.unix.UnixHelper
UnixHelper | public class UnixHelper (Code) | | Helper Methods for unix-systems and derived.
author: marc.eppelmann@reddot.de version: $Revision: 2056 $ |
whichCommand | public static String whichCommand(Code) | | whichCommand = "/usr/bin/which" or /bin/which
|
getCpCommand | public static String getCpCommand()(Code) | | Gets the absolute path of the cp (Copy) command. This is necessary, because the command is
located at /bin on linux but in /usr/bin on Sun Solaris.
/bin/cp on linux /usr/bin/cp on solaris |
getCustomCommand | public static String getCustomCommand(String aCommand)(Code) | | Gets the absolute Pathe to the given custom command. This is necessary, because the command
may be located at /bin on linux but in /usr/bin on Sun Solaris. Which can locate it in your
$PATH for you.
Parameters: aCommand - a Custom Command /bin/aCommand on linux /usr/bin/aCommand on solaris |
getEtcPasswdArray | public static ArrayList<String> getEtcPasswdArray()(Code) | | Get the lines from /etc/passwd as Array
the /etc/passwd as String ArrayList |
getRmCommand | public static String getRmCommand()(Code) | | Gets the absolute Pathe to the rm (Remove) Command. This is necessary, because the command is
located at /bin on linux but in /usr/bin on Sun Solaris.
/bin/rm on linux /usr/bin/rm on solaris |
getSuCommand | public static String getSuCommand()(Code) | | Gets the absolute path to the su (SuperUser) command. This is necessary, because the command
is located at /bin on linux but in /usr/bin on Sun Solaris.
/bin/su on linux /usr/bin/su on solaris |
getWhichCommand | public static String getWhichCommand()(Code) | | Gets the absolute path of the which command. This is necessary, because the command is
located at /bin on linux but in /usr/bin on Sun Solaris.
/bin/which on linux /usr/bin/which on solaris |
getYpCatCommand | public static String getYpCatCommand()(Code) | | Gets the absolute Pathe to the ypcat (YellowPage/NIS Cat) Command. This is necessary, because
the command is located at /bin on linux but in /usr/bin on Sun Solaris.
/bin/ypcat on linux /usr/bin/ypcat on solaris |
getYpPasswdArray | public static ArrayList<String> getYpPasswdArray()(Code) | | Get the YelloyPages (NIS) Users lines from 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.
the /etc/passwd as String ArrayList |
kdeIsInstalled | public static boolean kdeIsInstalled()(Code) | | Test if KDE is installed. This is done by $>/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,
true if kde is installed otherwise false. |
main | public static void main(String[] args)(Code) | | Standalone Test Main Method call with : > java -cp ../_build
com.izforge.izpack.util.os.unix.UnixHelper
Parameters: args - commandline args |
|
|