diff options
| author | Silvio Rhatto <rhatto@riseup.net> | 2017-03-11 16:23:17 -0300 | 
|---|---|---|
| committer | Silvio Rhatto <rhatto@riseup.net> | 2017-03-11 16:23:17 -0300 | 
| commit | 0b507f126628d0c39d3cbf4555fe51dc09852842 (patch) | |
| tree | 465e9a3d164c59aa6fa3dc4fccccb06a9c8e79c4 | |
| parent | 29f983f9ae965e7c02f039bd1e21ca916ded77e7 (diff) | |
| download | kvmx-0b507f126628d0c39d3cbf4555fe51dc09852842.tar.gz kvmx-0b507f126628d0c39d3cbf4555fe51dc09852842.tar.bz2 | |
Adds shred and wipe actions
| -rwxr-xr-x | kvmx | 26 | 
1 files changed, 26 insertions, 0 deletions
| @@ -481,6 +481,32 @@ function kvmx_destroy {    echo "$BASENAME: removed image and state files, but not the whole`dirname $image` folder."  } +# Shred a guest +function kvmx_shred { +  kvmx_stop + +  if which shred &> /dev/null; then +    shred $image +    rm -f $image +  else +    echo "$BASENAME: error shreding $image: shred program not available." +    exit 1 +  fi +} + +# Wipe a guest +function kvmx_wipe { +  kvmx_stop + +  if which wipe &> /dev/null; then +    wipe -f $image +    rm   -f $image +  else +    echo "$BASENAME: error wipeing $image: wipe program not available." +    exit 1 +  fi +} +  # Purge a guest and all its configuration  function kvmx_purge {    kvmx_destroy | 
