Author: mzugec
Date: Tue Mar 10 13:09:20 2009
New Revision: 56043
URL: http://svn.opensuse.org/viewcvs/yast?rev=56043&view=rev
Log:
autologin discovery authentication (bnc#392428)
Modified:
branches/SuSE-SLE-10-SP3-Branch/iscsi-client/VERSION
branches/SuSE-SLE-10-SP3-Branch/iscsi-client/package/yast2-iscsi-client.changes
branches/SuSE-SLE-10-SP3-Branch/iscsi-client/src/IscsiClient.ycp
Modified: branches/SuSE-SLE-10-SP3-Branch/iscsi-client/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/iscsi-client/VERSION?rev=56043&r1=56042&r2=56043&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/iscsi-client/VERSION (original)
+++ branches/SuSE-SLE-10-SP3-Branch/iscsi-client/VERSION Tue Mar 10 13:09:20 2009
@@ -1 +1 @@
-2.14.45
+2.14.46
Modified: branches/SuSE-SLE-10-SP3-Branch/iscsi-client/package/yast2-iscsi-client.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/iscsi-client/package/yast2-iscsi-client.changes?rev=56043&r1=56042&r2=56043&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/iscsi-client/package/yast2-iscsi-client.changes (original)
+++ branches/SuSE-SLE-10-SP3-Branch/iscsi-client/package/yast2-iscsi-client.changes Tue Mar 10 13:09:20 2009
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Tue Mar 10 13:07:53 CET 2009 - mzugec@suse.cz
+
+- autologin discovery authentication (bnc#392428)
+- 2.14.46
+
+-------------------------------------------------------------------
Tue Mar 10 10:26:13 CET 2009 - mzugec@suse.cz
- hide iBFT passwords (bnc#426945)
Modified: branches/SuSE-SLE-10-SP3-Branch/iscsi-client/src/IscsiClient.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/iscsi-client/src/IscsiClient.ycp?rev=56043&r1=56042&r2=56043&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/iscsi-client/src/IscsiClient.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/iscsi-client/src/IscsiClient.ycp Tue Mar 10 13:09:20 2009
@@ -411,32 +411,39 @@
}
global boolean autoLogOn(){
-y2milestone("begin of autoLogOn function");
+ y2milestone("begin of autoLogOn function");
map b = getiBFT();
-y2milestone("data read from iBFT card %1", b);
+ y2milestone("data read from iBFT card %1", b);
if ( b != $[] ){
-y2milestone("checking size of %1 and %2", b["iSCSI_TARGET_NAME"]:"", b["iSCSI_TARGET_IPADDR"]:"");
+ y2milestone("checking size of %1 and %2", b["iSCSI_TARGET_NAME"]:"", b["iSCSI_TARGET_IPADDR"]:"");
if (size(b["iSCSI_TARGET_NAME"]:"")>0 && size(b["iSCSI_TARGET_IPADDR"]:"")>0){
list <string> curr_rec = [sformat("%1:%2", b["iSCSI_TARGET_IPADDR"]:"", b["iSCSI_TARGET_PORT"]:"3260"), b["iSCSI_TARGET_NAME"]:""];
-y2milestone("variable curr_rec %1", curr_rec);
+ y2milestone("variable curr_rec %1", curr_rec);
if (connected( curr_rec , false) == false){
-y2milestone("in case not connected do discovery");
- // do discovery
- SCR::Execute(.target.bash, sformat("iscsiadm -m discovery -t st -p %1:%2", b["iSCSI_TARGET_IPADDR"]:"", b["iSCSI_TARGET_PORT"]:"3260"));
+ y2milestone("in case not connected do discovery");
+ // do discovery
+ saveConfig(b["iSCSI_TARGET_CHAP_NAME_IN"]:"", b["iSCSI_TARGET_CHAP_PASSWORD_IN"]:"", b["iSCSI_TARGET_CHAP_NAME"]:"", b["iSCSI_TARGET_CHAP_PASSWORD"]:"");
+ SCR::Execute(.target.bash, sformat("iscsiadm -m discovery -t st -p %1:%2", b["iSCSI_TARGET_IPADDR"]:"", b["iSCSI_TARGET_PORT"]:"3260"));
+ oldConfig();
// do authentication if needed
- if (size(b["iSCSI_TARGET_CHAP_NAME"]:"")>0 && size(b["iSCSI_TARGET_CHAP_PASSWORD"]:"")>0){
-y2milestone("do authentication with %1 and %2", b["iSCSI_TARGET_CHAP_NAME"]:"", b["iSCSI_TARGET_CHAP_PASSWORD"]:"");
+ if (size(b["iSCSI_TARGET_CHAP_NAME"]:"")>0 && size(b["iSCSI_TARGET_CHAP_PASSWORD"]:"")>0){
+ y2milestone("do authentication with %1 and %2", b["iSCSI_TARGET_CHAP_NAME"]:"", b["iSCSI_TARGET_CHAP_PASSWORD"]:"");
setValue(curr_rec, "node.session.auth.username", b["iSCSI_TARGET_CHAP_NAME"]:"");
setValue(curr_rec, "node.session.auth.password", b["iSCSI_TARGET_CHAP_PASSWORD"]:"");
setValue(curr_rec, "node.session.auth.authmethod", "CHAP");
- } else y2internal("No authentication used for autoLogOn");
+ }
+ if (size(b["iSCSI_TARGET_CHAP_NAME_IN"]:"")>0 && size(b["iSCSI_TARGET_CHAP_PASSWORD_IN"]:"")>0){
+ y2milestone("do authentication with %1 and %2", b["iSCSI_TARGET_CHAP_NAME_IN"]:"", b["iSCSI_TARGET_CHAP_PASSWORD_IN"]:"");
+ setValue(curr_rec, "node.session.auth.username_in", b["iSCSI_TARGET_CHAP_NAME_IN"]:"");
+ setValue(curr_rec, "node.session.auth.password_in", b["iSCSI_TARGET_CHAP_PASSWORD_IN"]:"");
+ }
// log on into target
SCR::Execute(.target.bash, sformat("iscsiadm -m node -T %1 -p %2:%3 --login ", b["iSCSI_TARGET_NAME"]:"", b["iSCSI_TARGET_IPADDR"]:"", b["iSCSI_TARGET_PORT"]:"3260"));
// set startup status to automatic
-y2milestone("set startup status to automatic");
+ y2milestone("set startup status to automatic");
setStartupStatus(curr_rec, "automatic");
} else y2error("Already connected, no autoLogOn needed");
} else y2error("iSCSI_TARGET_NAME or iSCSI_TARGET_IPADDR are not available. Couldn't do autoLogOn");
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org