forked from crosscloudci/cross-cloud
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsocat.sh
More file actions
19 lines (15 loc) · 717 Bytes
/
socat.sh
File metadata and controls
19 lines (15 loc) · 717 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Insightful instructions, originally posted by Xynova (https://github.com/xynova)
# Make socat directories
mkdir -p /opt/bin/socat.d/bin /opt/bin/socat.d/lib
# Create socat wrapper
cat << EOF > /opt/bin/socat
#! /bin/bash
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/opt/bin
LD_LIBRARY_PATH=/opt/bin/socat.d/lib:$LD_LIBRARY_PATH exec /opt/bin/socat.d/bin/socat "\$@"
EOF
chmod +x /opt/bin/socat
# Get socat and libraries from the CoreOS toolbox
toolbox dnf install -y socat
toolbox cp -f /usr/bin/socat /media/root/opt/bin/socat.d/bin/socat
toolbox cp -f /usr/lib64/libssl.so.1.0.2h /media/root/opt/bin/socat.d/lib/libssl.so.10
toolbox cp -f /usr/lib64/libcrypto.so.1.0.2h /media/root/opt/bin/socat.d/lib/libcrypto.so.10