Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Aster MegaRAC IPMI q&d fix for broken iKVM jviewer.jnlp
if [ "$#" -ne 3 ]; then
echo "Usage: $0 [ip address] [user name] [password]"
exit 1
COOKIE=$(curl "http://${IP}/rpc/WEBSES/create.asp" --silent --raw --data "WEBVAR_USERNAME=${IPMI_USER}&WEBVAR_PASSWORD=${IPMI_PASS}" -o - | perl -ne "m/\'SESSION\_COOKIE\'\s\:\s\'(.*?)\'/sg ? print \$1 : ();")
TOKEN=$(curl "http://${IP}/rpc/getsessiontoken.asp" -H "Cookie: SessionCookie=${COOKIE}" --silent --raw -o - | perl -ne "m/\'STOKEN\'\s\:\s\'(.*?)\'/sg ? print \$1 : ();")
cat <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="https://${IP}/Java">
<vendor>American Megatrends, Inc.</vendor>
<description kind="one-line">JViewer Console Redirection Application</description>
<description kind="tooltip">JViewer Console Redirection Application</description>
<description kind="short">
JViewer enables a user to view the video display of managed server via KVM.
It also enables the user to redirect his local keyboard, mouse for managing the server remotely.
<j2se version="1.5+"/>
<jar href="release/JViewer.jar"/>
<resources os="Windows" arch="amd64">
<j2se version="1.5+"/>
<nativelib href="release/Win64.jar"/>
<resources os="Windows" arch="x86">
<j2se version="1.5+"/>
<nativelib href="release/Win32.jar"/>
<resources os="Linux" arch="x86">
<j2se version="1.5+"/>
<nativelib href="release/Linux_x86_32.jar"/>
<resources os="Linux" arch="i386">
<j2se version="1.5+"/>
<nativelib href="release/Linux_x86_32.jar"/>
<resources os="Linux" arch="x86_64">
<j2se version="1.5+"/>
<nativelib href="release/Linux_x86_64.jar"/>
<resources os="Linux" arch="amd64">
<j2se version="1.5+"/>
<nativelib href="release/Linux_x86_64.jar"/>
javaws -nosecurity -jnlp $OUTFILE >/dev/null & disown && sleep 1 && rm -f $OUTFILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment