Search
j0ke.net Open Build Service
>
Projects
>
home:jg
:
playground
>
dracut
> 0205-iscsi-set-initiator-from-ibft-if-possible.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0205-iscsi-set-initiator-from-ibft-if-possible.patch of Package dracut
From d31ba0f55e36cf333641740349737405c6dd50f7 Mon Sep 17 00:00:00 2001 From: Harald Hoyer <harald@redhat.com> Date: Tue, 19 Apr 2011 12:52:47 +0200 Subject: [PATCH] iscsi: set initiator from ibft, if possible --- modules.d/95iscsi/iscsiroot | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules.d/95iscsi/iscsiroot b/modules.d/95iscsi/iscsiroot index 23e26a6..b3b00c3 100755 --- a/modules.d/95iscsi/iscsiroot +++ b/modules.d/95iscsi/iscsiroot @@ -120,7 +120,6 @@ handle_netroot() getarg ro && iscsirw=ro getarg rw && iscsirw=rw fsopts=${fsopts+$fsopts,}${iscsirw} - if [ -z $iscsi_initiator ]; then # XXX Where are these from? [ -f /etc/initiatorname.iscsi ] && . /etc/initiatorname.iscsi @@ -132,6 +131,12 @@ handle_netroot() # if missing? fi + if [ -z $iscsi_initiator ]; then + if [ -f /sys/firmware/ibft/initiator/initiator-name ]; then + iscsi_initiator=$(while read line; do echo $line;done < /sys/firmware/ibft/initiator-name) + fi + fi + if [ -z $iscsi_target_port ]; then iscsi_target_port=3260 fi -- 1.8.3.1