Server IP : 213.176.29.180  /  Your IP : 3.145.39.183
Web Server : Apache
System : Linux 213.176.29.180.hostiran.name 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
User : webtaragh ( 1001)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/../lib/firewalld/../dracut/modules.d/95lunmask/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/../lib/firewalld/../dracut/modules.d/95lunmask/sas_transport_scan_lun.sh
#!/bin/bash
#
# sas_transport_lun_scan
#
# Selectively enable individual LUNs behind a SAS end device
#
# ACTION=="add", SUBSYSTEM=="sas_transport", ATTR{sas_address}=="sas_addr", \
#    PROGRAM="sas_transport_lun_scan lun"
#

[ -z $DEVPATH ] && exit 1

if [ -n "$1" ] ; then
    LUN=$1
else
    LUN=-
fi
ID=${DEVPATH##*/end_device-}
HOST=${ID%%:*}
CHANNEL=${ID%%-*}
CHANNEL=${CHANNEL#*:}
if [ -f /sys$DEVPATH/scsi_target_id ] ; then
    TARGET=$(cat /sys$DEVPATH/scsi_target_id)
fi
[ -z "$TARGET" ] && exit 1
echo 0 $TARGET $LUN > /sys/class/scsi_host/host$HOST/scan