#!/bin/sh
# See "/etc/udev/rules.d/85-persistant-storage-fix.rules".
#
# uDev may (inadvertently) call this script several times, with several
# (differing) device names. Use "grep" to see if these names are of the
# form "[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}", before permitting the device to power-up.

          scsi_disk_id=$(echo $1 | grep '^[0-9]\{1,2\}:[0-9]\{1,2\}')
if [ -n "$scsi_disk_id" ]; then
  echo 1 > /sys/class/scsi_disk/$scsi_disk_id/allow_restart
#      cat /sys/class/scsi_disk/$scsi_disk_id/allow_restart >> /tmp/fa_fix.log
fi
