Created
December 15, 2021 00:39
-
-
Save xtman/ff71cf4c219a02f5cba173865695ebb0 to your computer and use it in GitHub Desktop.
Patch and install Parallel tools on Rocky Linux or CentOS Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [[ ! -d "/media/$(whoami)/Parallels Tools" ]]; then | |
echo "Please mount parallels tools disk before install" | |
exit | |
fi | |
echo "Copy install files to /tmp/parallels_fixed" | |
cp -rf "/media/$(whoami)/Parallels Tools" /tmp/parallels_fixed | |
chmod -R 755 /tmp/parallels_fixed | |
cd /tmp/parallels_fixed/kmods | |
echo "Unpack prl_mod.tar.gz" | |
tar -xzf prl_mod.tar.gz | |
rm prl_mod.tar.gz | |
echo "Patch prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c" | |
sed '1i\#include <uapi/linux/mount.h>' -i prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c | |
echo "Repack prl_mod.tar.gz" | |
tar -zcvf prl_mod.tar.gz . dkms.conf Makefile.kmods > /dev/null | |
cd /tmp/parallels_fixed | |
echo "Start install" | |
sudo ./install | |
echo "Remove /tmp/parallels_fixed" | |
rm -rf /tmp/parallels_fixed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment