08-checklist.sh 580 B

12345678910111213141516171819202122232425
  1. #!/bin/sh
  2. # shellcheck disable=SC2046
  3. set -f
  4. set +f -- $(stty size)
  5. height=$(($1 / 2))
  6. width=$(($2 / 2))
  7. numitems=$((height / 2))
  8. whiptail \
  9. --title 'checklist' \
  10. --backtitle 'whiptail' \
  11. --ok-button 'Aceptar' \
  12. --cancel-button 'Cancelar' \
  13. --checklist \
  14. 'Selecciona una o más opciones:' \
  15. "${height}" \
  16. "${width}" \
  17. "${numitems}" \
  18. 'NET_OUTBOUND' 'Allow connections to other hosts.' 0 \
  19. 'NET_INBOUND' 'Allow connections from other hosts.' 0 \
  20. 'LOCAL_MOUNT' 'Allow mounting of local devices.' 1 \
  21. 'REMOTE_MOUNT' 'Allow mounting of remote devices.' 0