SILENT KILLERPanel

Current Path: > > lib > udev


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //lib/udev

NameTypeSizeLast ModifiedActions
hwdb.d Directory - -
rules.d Directory - -
ata_id File 41712 bytes April 22 2025 01:58:57.
cdrom_id File 33288 bytes April 22 2025 01:58:57.
collect File 21064 bytes April 22 2025 01:58:57.
fc_wwpn_id File 1125 bytes October 08 2022 11:49:23.
fido_id File 16824 bytes April 22 2025 01:58:57.
kdump-udev-throttler File 1444 bytes September 24 2024 08:36:00.
kpartx_id File 2383 bytes April 22 2025 01:55:39.
libinput-device-group File 16680 bytes June 29 2022 09:12:12.
libinput-fuzz-extract File 21160 bytes June 29 2022 09:12:12.
libinput-fuzz-to-zero File 12160 bytes June 29 2022 09:12:12.
mtd_probe File 12704 bytes April 22 2025 01:58:57.
prefixdevname File 1531272 bytes December 16 2019 19:52:38.
rename_device File 16856 bytes November 10 2022 08:01:00.
scsi_id File 54984 bytes April 22 2025 01:58:57.
v4l_id File 12280 bytes April 22 2025 01:58:57.

Reading File: //lib/udev/fc_wwpn_id

#!/bin/bash
#
# fc_wwpn_id
#
# Generates device node names links based on FC WWPN
# Copyright (c) 2016 Hannes Reinecke, SUSE Linux GmbH
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation version 2 of the License.
#

DEVPATH=$1
SCSIPATH=$(cd -P "/sys$DEVPATH/device" || exit; echo "$PWD")

d=$SCSIPATH
[ -d "$d/scsi_disk" ] || exit 0
target_lun=${d##*:}

while [ -n "$d" ] ; do
    d=${d%/*}
    e=${d##*/}
    case "$e" in
	rport*)
	    rport=$e
	    rport_dir="/sys/class/fc_remote_ports/$rport"
	    if [ -d "$rport_dir" ] ; then
		rport_wwpn=$(cat "$rport_dir/port_name")
	    fi
	    ;;
	host*)
	    host=$e
	    host_dir="/sys/class/fc_host/$host"
	    if [ -d "$host_dir" ] ; then
		host_wwpn=$(cat "$host_dir/port_name")
		break;
	    fi
    esac
done

if [ -n "$rport_wwpn" ] || [ -n "$host_wwpn" ] ; then
    echo "FC_TARGET_LUN=$target_lun"
fi

if [ -n "$rport_wwpn" ] ; then
    echo "FC_TARGET_WWPN=$rport_wwpn"
fi

if [ -n "$host_wwpn" ] ; then
    echo "FC_INITIATOR_WWPN=$host_wwpn"
fi

SILENT KILLER Tool