ZFS: Difference between revisions

imported>Ghuntley
No edit summary
imported>Mic92
This script is just not doing the right thing.
Line 173: Line 173:
     # and kill the other prompt so boot can continue
     # and kill the other prompt so boot can continue
     postCommands = ''
     postCommands = ''
       cat <<EOF > /root/unlock.sh
       cat <<EOF > /root/.profile
       if pgrep -x "zfs" > /dev/null
       if pgrep -x "zfs" > /dev/null
       then
       then
          zfs load-key -a
        zpool import -a
          killall zfs
        zfs load-key -a
        killall zfs
       else
       else
          echo "zfs not running -- maybe the pool is taking some time to load for some unforseen reason."
        echo "zfs not running -- maybe the pool is taking some time to load for some unforseen reason."
       fi
       fi
       EOF
       EOF
 
     '';
      cat <<EOF > /root/.profile
  };
      zpool import -a
      zpool status
      echo
 
      chmod u+x /root/unlock.sh
      cat /root/unlock.sh
 
      ls -ltr
      EOF
     ''; };
};
};
</syntaxhighlight>
</syntaxhighlight>