aboutsummaryrefslogtreecommitdiff
path: root/network/webex/doinst.sh
diff options
context:
space:
mode:
Diffstat (limited to 'network/webex/doinst.sh')
-rw-r--r--network/webex/doinst.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/network/webex/doinst.sh b/network/webex/doinst.sh
index 5fb28930db..e3302b8046 100644
--- a/network/webex/doinst.sh
+++ b/network/webex/doinst.sh
@@ -1,3 +1,41 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
+
+# Adopted from control.tar.gz/postinst.
+# Thanks to Eduardo Domínguez.
+function getMaxLibCxx(){
+ local maxVersion=0
+ local path=$1
+
+ if test -f "$path"; then
+ versions=$(strings $path | grep LIBCXX)
+ for version in $versions
+ do
+ versionArr=(${version//./ })
+ versionArrLen=${#versionArr[@]}
+ if [ $versionArrLen == 3 ]
+ then
+ if [ ${versionArr[2]} -gt ${maxVersion} ]
+ then
+ maxVersion=${versionArr[2]}
+ fi
+ fi
+ done
+ fi
+ echo "$maxVersion"
+}
+
+localLib=/usr/lib64/libstdc++.so.6
+local_max_version="$(getMaxLibCxx $localLib)"
+
+packageLib=/opt/Webex/lib/libstdc++.so.6
+deactivatedPackageLib=/opt/Webex/lib/xlibstdc++.so.6
+package_max_version="$(getMaxLibCxx $packageLib)"
+
+if [ ${local_max_version} -ge ${package_max_version} ]
+then
+ if test -f "$packageLib"; then
+ mv -f $packageLib $deactivatedPackageLib
+ fi
+fi