Skip to content

Instantly share code, notes, and snippets.

@tcooper
Last active December 31, 2015 16:19
Show Gist options
  • Save tcooper/8012913 to your computer and use it in GitHub Desktop.
Save tcooper/8012913 to your computer and use it in GitHub Desktop.
Fixes /export -> /state/partition1 on a Rocks devel appliance
#!/bin/bash
#
# Fixes the /export -> /state/partition1 symlink on a Rocks devel appliance in Rocks 6.1
#
# Author: Trevor Cooper <tcooper@sdsc.edu>
# Twitter: @HPCDevOps
# GitHub: https://github.com/tcooper
#
if [ ! -L /export ]; then
( cd /export && tar -cf - ./rocks ) | ( cd /state/partition1 && tar -xf - )
( cd /export && tar -cf - ./site-roll ) | ( cd /state/partition1 && tar -xf - )
mv /export /export-old && ln -s /state/partition1 /export && \rm -rf /export-old
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment