Guest User

Untitled

a guest
Sep 11th, 2019
80
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. # Used by Samba to grok ZFS free space
  3.  
  4. CUR_PATH=`pwd`
  5.  
  6. USED=$((`zfs get -o value -Hp used $CUR_PATH` / 1024)) > /dev/null
  7. AVAIL=$((`zfs get -o value -Hp available $CUR_PATH` / 1024)) > /dev/null
  8.  
  9. TOTAL=$(($USED+$AVAIL)) > /dev/null
  10.  
  11. echo $TOTAL $AVAIL
RAW Paste Data