mirror of
https://github.com/DomiStyle/docker-idrac6.git
synced 2024-12-22 05:45:22 +01:00
Make keycode hack optional
This commit is contained in:
parent
356ea9990d
commit
97c1208581
@ -6,12 +6,15 @@ ENV APP_NAME="iDRAC 6" \
|
||||
COPY keycode-hack.c /keycode-hack.c
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y software-properties-common wget && \
|
||||
apt-get install -y wget software-properties-common && \
|
||||
add-apt-repository ppa:openjdk-r/ppa && \
|
||||
apt-get update && \
|
||||
apt-get install -y openjdk-7-jdk gcc && \
|
||||
gcc -o /keycode-hack.so /keycode-hack.c -shared -s -ldl -fPIC && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
apt-get remove -y gcc wget software-properties-common && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm /keycode-hack.c
|
||||
|
||||
RUN mkdir /app && \
|
||||
chown ${USER_ID}:${GROUP_ID} /app
|
||||
|
@ -93,4 +93,10 @@ cd /app
|
||||
|
||||
echo "${GREEN}Initialization complete, starting virtual console${NC}"
|
||||
|
||||
LD_PRELOAD=/keycode-hack.so 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"
|
||||
if [ -n "$ENABLE_KEYCODE_HACK" ]; then
|
||||
echo "Enabling keycode hack"
|
||||
|
||||
export LD_PRELOAD=/keycode-hack.so
|
||||
fi
|
||||
|
||||
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"
|
||||
|
Loading…
Reference in New Issue
Block a user