$95 GRAYBYTE WORDPRESS FILE MANAGER $99

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/usr/lib/udev/

HOME
Current File : /usr/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

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
17 Feb 2026 9.24 PM
root / root
0555
hwdb.d
--
16 Dec 2025 9.33 PM
root / root
0755
rules.d
--
16 Dec 2025 9.33 PM
root / root
0755
ata_id
40.734 KB
5 Nov 2025 4.26 PM
root / root
0755
cdrom_id
32.508 KB
5 Nov 2025 4.26 PM
root / root
0755
collect
20.57 KB
5 Nov 2025 4.26 PM
root / root
0755
fc_wwpn_id
1.099 KB
8 Oct 2022 6.49 PM
root / root
0755
fido_id
16.43 KB
5 Nov 2025 4.26 PM
root / root
0755
kdump-udev-throttler
1.41 KB
24 Sep 2024 3.36 PM
root / root
0755
kpartx_id
2.327 KB
22 Apr 2025 8.55 AM
root / root
0755
mtd_probe
12.406 KB
5 Nov 2025 4.26 PM
root / root
0755
prefixdevname
1.46 MB
17 Dec 2019 2.52 AM
root / root
0755
rename_device
16.477 KB
10 Nov 2025 5.42 PM
root / root
0755
scsi_id
53.695 KB
5 Nov 2025 4.26 PM
root / root
0755
v4l_id
11.992 KB
5 Nov 2025 4.26 PM
root / root
0755

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF