Bug#258108: s390-netdevice: IUCV not implemented
Package: s390-netdevice
Version: 0.05
Severity: important
Tags: patch
I've implemented IUCV support for S/390. It seems to work--I'm doing an
installation with it now.
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (700, 'testing')
Architecture: s390
Kernel: Linux 2.4.17
Locale: LANG=C, LC_CTYPE=C
--- s390-netdevice.templates.orig 2004-07-07 14:10:50.000000000 -0400
+++ s390-netdevice.templates 2004-07-07 11:40:30.000000000 -0400
@@ -114,6 +114,13 @@
driver to work and it must be set up on both ends of the
communication.
+Template: debian-installer/s390/netdevice/iucv/confirm
+Type: boolean
+Default: true
+_Description: Is this configuration correct?
+ The configured parameter is:
+ peer = ${peer}
+
Template: debian-installer/s390-netdevice/title
Type: text
# Main menu item
--- netdevice.c.orig 2004-07-07 14:11:43.000000000 -0400
+++ netdevice.c 2004-07-07 13:38:10.000000000 -0400
@@ -44,6 +44,7 @@
static int device_selected, device_ctc_protocol, device_qeth_lcs_port;
static char *device_qeth_portname, *device_qeth_portname_display;
static char *type_text = "", chandev_parm[256], chandev_module_parm[256];
+static char *iucv_peername, *iucv_peername_display;
#define TEMPLATE_PREFIX "debian-installer/s390/netdevice/"
@@ -352,6 +353,36 @@
return 0;
}
+static int get_iucv_peername (void)
+{
+ char *ptr;
+ int ret, j, k;
+
+ ret = my_debconf_input ("critical", TEMPLATE_PREFIX "iucv/peer", &ptr);
+ if (ret)
+ return ret;
+
+ free (iucv_peername);
+
+ j = strlen (ptr);
+ if (j)
+ {
+ di_log (DI_LOG_LEVEL_WARNING, "length: %d", j);
+ iucv_peername = strdup (ptr);
+ for (k = 0; k < j; k++)
+ iucv_peername[k] = toupper (iucv_peername[k]);
+ iucv_peername_display = iucv_peername;
+ }
+ else
+ {
+ iucv_peername = NULL;
+ iucv_peername_display = "-";
+ return 1;
+ }
+
+ return 0;
+}
+
static int confirm (void)
{
char *template, buf[10], *ptr;
@@ -368,6 +399,9 @@
case TYPE_LCS:
template = TEMPLATE_PREFIX "lcs/confirm";
break;
+ case TYPE_IUCV:
+ template = TEMPLATE_PREFIX "iucv/confirm";
+ break;
default:
return -1;
}
@@ -460,6 +494,21 @@
if (mkdir ("/etc/modutils", 777) && errno != EEXIST)
return 1;
+ if (strncmp(type_text,"iucv",4) == 0) {
+ /* IUCV, not chandev, stuff */
+
+ f = fopen("/etc/modutils/netiucv", "a");
+ if (!f)
+ return 1;
+ fprintf(f,"iucv=%s\n",iucv_peername);
+
+ snprintf (buf, sizeof (buf), "modprobe netiucv iucv=%s",iucv_peername);
+
+ di_exec_shell_log (buf);
+
+ return 0;
+ }
+
chandev = fopen ("/proc/chandev", "a");
if (!chandev)
@@ -516,7 +565,7 @@
{
BACKUP, GET_NETWORKTYPE, GET_IUCV, GET_CHANNEL,
GET_CTC_PROTOCOL, GET_QETH_LCS_PORT, GET_QETH_PORTNAME,
- CONFIRM
+ CONFIRM, GET_IUCV_PEERNAME
}
state = GET_NETWORKTYPE;
@@ -549,7 +598,8 @@
}
break;
case GET_IUCV:
- return 1;
+ state = GET_IUCV_PEERNAME;
+ break;
case GET_CHANNEL:
ret = get_channel ();
switch (ret)
@@ -625,6 +675,17 @@
return 1;
}
break;
+ case GET_IUCV_PEERNAME:
+ ret = get_iucv_peername ();
+ switch (ret)
+ {
+ case 0:
+ state = CONFIRM;
+ break;
+ default:
+ return 1;
+ }
+ break;
case CONFIRM:
ret = confirm ();
switch (ret)
Reply to: