Skip to content

Instantly share code, notes, and snippets.

@dav1x
Created May 5, 2017 19:41
Show Gist options
  • Save dav1x/4726c8e72cc70c2a59f4b98e85f61098 to your computer and use it in GitHub Desktop.
Save dav1x/4726c8e72cc70c2a59f4b98e85f61098 to your computer and use it in GitHub Desktop.
--- ks 2017-05-05 14:26:38.000000000 -0500
+++ fixed_ks 2017-05-05 14:40:56.000000000 -0500
@@ -118,5 +118,8 @@
echo "Removing /root/anaconda-ks.cfg"
rm -f /root/anaconda-ks.cfg
+export LD_LIBRARY_PATH=/var/lib/containers/atomic/open-vm-tools/rootfs/usr/lib64/:$LD_LIBRARY_PATH >> /etc/profile.d/open-vm-tools.sh
+export PATH=/var/lib/containers/atomic/open-vm-tools/rootfs/usr/bin/:$PATH >> /etc/profile.d/open-vm-tools.sh
+
%end
@parasense
Copy link

Maybe using here-docs?
I'm not 100% on the tcsh code block. look it it over and let me know what you think.

cat <<EOF > /etc/profile.d/open-vm-tools.sh
export LD_LIBRARY_PATH=/var/lib/containers/atomic/open-vm-tools/rootfs/usr/lib64/:$LD_LIBRARY_PATH
export PATH=/var/lib/containers/atomic/open-vm-tools/rootfs/usr/bin/:$PATH
EOF

cat <<EOF > /etc/profile.d/open-vm-tools.csh
setenv LD_LIBRARY_PATH /var/lib/containers/atomic/open-vm-tools/rootfs/usr/lib64\:$LD_LIBRARY_PATH
setenv PATH /var/lib/containers/atomic/open-vm-tools/rootfs/usr/bin\:$PATH
EOF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment