This commit is contained in:
parent
b2ffb3104c
commit
54497d5ebc
44
open-iscsi-fixup-onboot-for-loginall
Normal file
44
open-iscsi-fixup-onboot-for-loginall
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
Subject: Allow 'onboot' as loginall parameter
|
||||||
|
From: Hannes Reinecke <hare@suse.de>
|
||||||
|
Date: Fri Dec 5 08:57:29 2008 +0100:
|
||||||
|
Git: adcc1860e58d8e15720ff0c9473fda55c6144521
|
||||||
|
|
||||||
|
We are using to 'onboot' parameter to setup iscsi connections
|
||||||
|
in the initrd. Thus we should be able to use 'onboot' as a valid
|
||||||
|
parameter for loginall, too.
|
||||||
|
|
||||||
|
References: 449108
|
||||||
|
|
||||||
|
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||||
|
|
||||||
|
diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c
|
||||||
|
index bac9a5a..3fa4964 100644
|
||||||
|
--- a/usr/iscsiadm.c
|
||||||
|
+++ b/usr/iscsiadm.c
|
||||||
|
@@ -235,15 +235,10 @@ static int print_ifaces(int info_level)
|
||||||
|
static int
|
||||||
|
match_startup_mode(node_rec_t *rec, char *mode)
|
||||||
|
{
|
||||||
|
- /*
|
||||||
|
- * we always skip onboot because this should be handled by
|
||||||
|
- * something else
|
||||||
|
- */
|
||||||
|
- if (rec->startup == ISCSI_STARTUP_ONBOOT)
|
||||||
|
- return -1;
|
||||||
|
-
|
||||||
|
if ((!strcmp(mode, "automatic") &&
|
||||||
|
rec->startup == ISCSI_STARTUP_AUTOMATIC) ||
|
||||||
|
+ (!strcmp(mode, "onboot") &&
|
||||||
|
+ rec->startup == ISCSI_STARTUP_ONBOOT) ||
|
||||||
|
(!strcmp(mode, "manual") &&
|
||||||
|
rec->startup == ISCSI_STARTUP_MANUAL) ||
|
||||||
|
!strcmp(mode, "all"))
|
||||||
|
@@ -252,6 +247,8 @@ match_startup_mode(node_rec_t *rec, char *mode)
|
||||||
|
/* support conn or session startup params */
|
||||||
|
if ((!strcmp(mode, "automatic") &&
|
||||||
|
rec->conn[0].startup == ISCSI_STARTUP_AUTOMATIC) ||
|
||||||
|
+ (!strcmp(mode, "onboot") &&
|
||||||
|
+ rec->conn[0].startup == ISCSI_STARTUP_ONBOOT) ||
|
||||||
|
(!strcmp(mode, "manual") &&
|
||||||
|
rec->conn[0].startup == ISCSI_STARTUP_MANUAL) ||
|
||||||
|
!strcmp(mode, "all"))
|
41
open-iscsi-load-ibft-before-reading-sys-firmware
Normal file
41
open-iscsi-load-ibft-before-reading-sys-firmware
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
Subject: Load modules for initrd at before reading /sys/firmware/ibft
|
||||||
|
From: Hannes Reinecke <hare@suse.de>
|
||||||
|
Date: Fri Dec 5 10:02:18 2008 +0100:
|
||||||
|
Git: c7af54f96479394d2175f01cbcb770a22db1005a
|
||||||
|
|
||||||
|
The iBFT firmware can only be read after the module has been
|
||||||
|
loaded, obviously. So move the module loading around.
|
||||||
|
|
||||||
|
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||||
|
|
||||||
|
diff --git a/etc/mkinitrd/mkinitrd-boot.sh b/etc/mkinitrd/mkinitrd-boot.sh
|
||||||
|
index 9bd22ff..59294e5 100644
|
||||||
|
--- a/etc/mkinitrd/mkinitrd-boot.sh
|
||||||
|
+++ b/etc/mkinitrd/mkinitrd-boot.sh
|
||||||
|
@@ -49,6 +49,8 @@ tmp_InitiatorName="$(get_param InitiatorName)"
|
||||||
|
# reads the InitiatorName variable
|
||||||
|
. /etc/iscsi/initiatorname.iscsi
|
||||||
|
|
||||||
|
+load_modules
|
||||||
|
+
|
||||||
|
# Check of iBFT settings
|
||||||
|
if [ -d /sys/firmware/ibft/initiator ] ; then
|
||||||
|
# only use the iBFT InitiatorName if the commandline argument is not "default"
|
||||||
|
@@ -69,13 +71,13 @@ echo "InitiatorName=$InitiatorName" > /etc/iscsi/initiatorname.iscsi
|
||||||
|
|
||||||
|
unset iSCSI_warning_InitiatorName
|
||||||
|
|
||||||
|
-load_modules
|
||||||
|
-
|
||||||
|
echo "Starting iSCSI daemon"
|
||||||
|
/sbin/iscsid -n
|
||||||
|
|
||||||
|
-# log into iBFT nodes
|
||||||
|
-/sbin/iscsiadm -m fw -l
|
||||||
|
+if [ -d /sys/firmware/ibft/initiator ] ; then
|
||||||
|
+ # log into iBFT nodes
|
||||||
|
+ /sbin/iscsiadm -m fw -l
|
||||||
|
+fi
|
||||||
|
|
||||||
|
# Check for command line sessions
|
||||||
|
if [ -n "$TargetAddress" -a -n "$TargetName" ] ; then
|
29
open-iscsi-remove-dump-char
Normal file
29
open-iscsi-remove-dump-char
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
Subject: Comment out unused definitions in log.c
|
||||||
|
From: Hannes Reinecke <hare@suse.de>
|
||||||
|
Date: Fri Dec 5 08:56:45 2008 +0100:
|
||||||
|
Git: ceb0079d1fd46ee67e585d02543400004490877c
|
||||||
|
|
||||||
|
dump_line and dump_char are never used. So comment them out.
|
||||||
|
|
||||||
|
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||||
|
|
||||||
|
diff --git a/usr/log.c b/usr/log.c
|
||||||
|
index 4351456..0fb1595 100644
|
||||||
|
--- a/usr/log.c
|
||||||
|
+++ b/usr/log.c
|
||||||
|
@@ -308,6 +308,7 @@ void log_debug(int level, const char *fmt, ...)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if 0
|
||||||
|
static void __dump_line(int level, unsigned char *buf, int *cp)
|
||||||
|
{
|
||||||
|
char line[16*3+5], *lp = line;
|
||||||
|
@@ -341,6 +342,7 @@ static void __dump_char(int level, unsigned char *buf, int *cp, int ch)
|
||||||
|
|
||||||
|
#define dump_line() __dump_line(level, char_buf, &char_cnt)
|
||||||
|
#define dump_char(ch) __dump_char(level, char_buf, &char_cnt, ch)
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
static void log_flush(void)
|
||||||
|
{
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Dec 5 09:19:25 CET 2008 - hare@suse.de
|
||||||
|
|
||||||
|
- Fixup 'onboot' for loginall (bnc#449108)
|
||||||
|
- Remove unused 'dump_char' definition in log.c
|
||||||
|
- Load ibft module before reading /sys/firmware (bnc#450897)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Dec 2 15:47:31 CET 2008 - hare@suse.de
|
Tue Dec 2 15:47:31 CET 2008 - hare@suse.de
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ Group: Productivity/Networking/Other
|
|||||||
PreReq: %fillup_prereq %insserv_prereq
|
PreReq: %fillup_prereq %insserv_prereq
|
||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
Version: 2.0.870
|
Version: 2.0.870
|
||||||
Release: 21
|
Release: 22
|
||||||
Provides: linux-iscsi
|
Provides: linux-iscsi
|
||||||
Obsoletes: linux-iscsi
|
Obsoletes: linux-iscsi
|
||||||
%define iscsi_release 865
|
%define iscsi_release 865
|
||||||
@ -57,6 +57,9 @@ Patch21: %{name}-install-mkinitrd-scriptlets
|
|||||||
Patch22: %{name}-no-pid-file
|
Patch22: %{name}-no-pid-file
|
||||||
Patch23: %{name}-cxgb3i-support
|
Patch23: %{name}-cxgb3i-support
|
||||||
Patch24: %{name}-fw-crash-on-ppc
|
Patch24: %{name}-fw-crash-on-ppc
|
||||||
|
Patch25: %{name}-fixup-onboot-for-loginall
|
||||||
|
Patch26: %{name}-remove-dump-char
|
||||||
|
Patch27: %{name}-load-ibft-before-reading-sys-firmware
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -110,6 +113,9 @@ Authors:
|
|||||||
%patch22 -p1
|
%patch22 -p1
|
||||||
%patch23 -p1
|
%patch23 -p1
|
||||||
%patch24 -p1
|
%patch24 -p1
|
||||||
|
%patch25 -p1
|
||||||
|
%patch26 -p1
|
||||||
|
%patch27 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__make} OPTFLAGS="${RPM_OPT_FLAGS} -DLOCK_DIR=\\\"/etc/iscsi\\\""
|
%{__make} OPTFLAGS="${RPM_OPT_FLAGS} -DLOCK_DIR=\\\"/etc/iscsi\\\""
|
||||||
@ -157,6 +163,10 @@ fi
|
|||||||
%doc %{_mandir}/man8/*
|
%doc %{_mandir}/man8/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Dec 05 2008 hare@suse.de
|
||||||
|
- Fixup 'onboot' for loginall (bnc#449108)
|
||||||
|
- Remove unused 'dump_char' definition in log.c
|
||||||
|
- Load ibft module before reading /sys/firmware (bnc#450897)
|
||||||
* Tue Dec 02 2008 hare@suse.de
|
* Tue Dec 02 2008 hare@suse.de
|
||||||
- iscsiadm -m fw crashes on ppc (bnc#449116)
|
- iscsiadm -m fw crashes on ppc (bnc#449116)
|
||||||
* Thu Nov 20 2008 hare@suse.de
|
* Thu Nov 20 2008 hare@suse.de
|
||||||
|
Loading…
Reference in New Issue
Block a user