Commit ad51c4e4 authored by Robert Ricci's avatar Robert Ricci

Merge branch 'master' of gitlab.flux.utah.edu:ricci/snappy

parents 14da19d6 08cacb13
#!/bin/sh
ZFS=/sbin/zfs
SRCVOL=$1
if ! [ ${1:+1} ]
then
echo "ERROR: Need source volume"
exit 1;
fi
SNAP=snappy-`date +%s`
$ZFS snapshot $SRCVOL@$SNAP
......@@ -48,13 +48,13 @@ cache = []
def readCache():
global cache
if os.path.isfile(CACHE_FILE):
cache = open(CACHE_FILE).readlines()
cache = map(str.rstrip,open(CACHE_FILE).readlines())
def writeCache():
global cache
try:
f = open(CACHE_FILE,"w")
f.writelines("\n".join(cache))
f.writelines(map(lambda x: x + "\n",cache))
f.close()
except IOError:
# just do nothing - I think in the future, we will
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment