mirror of
https://github.com/DomiStyle/docker-idrac6.git
synced 2024-12-22 13:55:21 +01:00
Force iDRAC 5
This commit is contained in:
parent
1f20bc7aab
commit
504dfb8e7f
32
startapp.sh
32
startapp.sh
@ -50,32 +50,20 @@ mkdir lib
|
||||
|
||||
touch cookies
|
||||
|
||||
if ( curl -k -y 1 --head https://${IDRAC_HOST}/page/login.html | grep '200 OK' > /dev/null ); then
|
||||
IDRAC_VERSION=5
|
||||
echo "iDRAC version 5 detected"
|
||||
COOKIE=$(curl -k --data "WEBVAR_USERNAME=${IDRAC_USER}&WEBVAR_PASSWORD=${IDRAC_PASSWORD}" https://${IDRAC_HOST}/rpc/WEBSES/create.asp 2> /dev/null | grep SESSION_COOKIE | cut -d\' -f 4)
|
||||
echo "Cookie=SessionCookie=${COOKIE}" > cookies
|
||||
IDRAC_VERSION=5
|
||||
echo "iDRAC version 5 detected"
|
||||
COOKIE=$(curl -k --data "WEBVAR_USERNAME=${IDRAC_USER}&WEBVAR_PASSWORD=${IDRAC_PASSWORD}" https://${IDRAC_HOST}/rpc/WEBSES/create.asp 2> /dev/null | grep SESSION_COOKIE | cut -d\' -f 4)
|
||||
echo "Cookie=SessionCookie=${COOKIE}" > cookies
|
||||
|
||||
echo "Downloading required files"
|
||||
echo "Downloading required files"
|
||||
|
||||
download JViewer.jar .
|
||||
download JViewer.jar .
|
||||
# download Win64.jar lib
|
||||
# download Win32.jar lib
|
||||
download Linux_x86_32.jar lib
|
||||
download Linux_x86_64.jar lib
|
||||
download Linux_x86_32.jar lib
|
||||
download Linux_x86_64.jar lib
|
||||
# download Mac32.jar lib
|
||||
|
||||
args=$(curl -k --cookie Cookie=SessionCookie=${COOKIE} https://${IDRAC_HOST}/Java/jviewer.jnlp | awk -F '[<>]' '/argument/ { print $3 }')
|
||||
args=$(curl -k --cookie Cookie=SessionCookie=${COOKIE} https://${IDRAC_HOST}/Java/jviewer.jnlp | awk -F '[<>]' '/argument/ { print $3 }')
|
||||
|
||||
exec java -Djava.library.path="lib" -jar JViewer.jar $args
|
||||
elif ( curl -k -y 1 --head https://${IDRAC_HOST}/images/Ttl_2_iDRAC6_Ent_ML.png | grep '200 OK' > /dev/null ); then
|
||||
IDRAC_VERSION=6
|
||||
echo "iDRAC version 6 detected"
|
||||
echo "Downloading required files"
|
||||
|
||||
download avctKVM.jar .
|
||||
download avctKVMIOLinux64.jar lib
|
||||
download avctVMLinux64.jar lib
|
||||
|
||||
exec java -cp avctKVM.jar -Djava.library.path="lib" com.avocent.idrac.kvm.Main ip=${IDRAC_HOST} kmport=5900 vport=5900 user=${IDRAC_USER} passwd=${IDRAC_PASSWORD} apcp=1 version=2 vmprivilege=true "helpurl=https://${IDRAC_HOST}:443/help/contents.html"
|
||||
fi
|
||||
exec java -Djava.library.path="lib" -jar JViewer.jar $args
|
||||
|
Loading…
Reference in New Issue
Block a user