Adjusted snapshot.sh to work with ubuntu12.4 and centos6.5