You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
539 B

  1. #!/bin/sh
  2. if [ "$DEVTYPE" = disk ]; then
  3. if [ "$ACTION" = add ]; then
  4. vendor=`cat /sys/block/$DEVNAME/device/vendor`
  5. case "$vendor" in
  6. "VMware"*)
  7. model=`cat /sys/block/$DEVNAME/device/model`
  8. case "$model" in
  9. "Virtual disk"*)
  10. echo 180 > /sys/block/$DEVNAME/device/timeout
  11. ;;
  12. "VMware Virtual S")
  13. echo 180 > /sys/block/$DEVNAME/device/timeout
  14. ;;
  15. esac
  16. ;;
  17. esac
  18. fi
  19. fi