Fedora-DS on Linux for SYstem z

2007-09-06 Thread Massimiliano Belardi

Hi Guys,
   does anybody know if Fedora-DS is included on RedHat for Linux
distribution? Anybody tryied to compile it from source to System z platform?
Thanks
Max

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: VSwitch and IPv6

2007-09-06 Thread Alan Altmark
On Thursday, 09/06/2007 at 08:36 EDT, Scully, William P
[EMAIL PROTECTED] wrote:
 This leads me to believe that I need a VSwitch similar to:

 Define VSwitch INTRAV6  RDev 6C00 Connect Controller TCPIPOSA Ethernet

Correct.

 However, in doing so I'm not clear how, in Linux for zSeries, to
 configure the IP stack.  The IBM Device Drivers doc seems to imply that
 I should be setting the layer2 attribute of the qeth driver.  Is that
 so?  Or am I walking down a path with really isn't ideal?

Yes, you need to set the layer2 attribute, but you do that by setting
(e.g. LAYER2=) in the device configuration file.

Alan Altmark
z/VM Development
IBM Endicott

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


NPIV FCP connections through Multiple FC Switches

2007-09-06 Thread Craig Collins
We're running into a configuration issue trying to get NPIV FCP connections
to work through a switched fabric distributed across two locations.  At our
primary location, the z9 FCP is connected into Switch #1, a McData 3232
switch.  We have EMC DMX3 storage connected to Switch #1 as well and are
able to get the NPIV id logged onto the fabric, provisioned, and connecting
to the storage without a problem.  We have Linux guests booting off of the
SAN and are not using 3390 disk for them.  We setup the switch binding and
added the WWPN of the z9 port as a detached node on switch #1 to get this to
work.  That's the good news.

The problem we are having is getting the NPIV id logged into our backup
location DMX3 which is connected to Switch #2, another McData 3232 switch
ISL'd to Switch #1.  We thought we had a setting incorrect on the switches
so that the traffic is not making it all the way to the second DMX3, however
when we use the SCSIDISC utility under VM against the device which
corresponds to the NPIV id, it actually detects the storage port on the DMX3
but the DMX3 shows that we are not logged into the storage port with the
NPIV.  We've tried multiple settings on the switches to get this connected,
but without any success.  We have the NPIV and Switch Binding features
active on both McData 3232 switches even though I believe we only need NPIV
on the switch that the z9 port physically connects to.

Has anyone else done this and do you have suggestions as to settings we
should look at?

Craig Collins
State of Wisconsin

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


IP takeover across lpars fails through a vswitch

2007-09-06 Thread Ronald van der Laan
I've got 2 z/VM lpars and run a Linux server in each lpar that should be
able to service common ip address.  Both lpars are connected via double OSA
cards to a real switch.

 VM1  VM2
/==\ /==\
|  | |  |
|   /--\   | |   /--\   |
|   |  Linux1  |   | |   |  Linux2  |   |
|   \+-/   | |   \+-/   |
|| | || |
|| | || |
|   /+-\   | |   /+-\   |
|   | vswitch1 |   | |   | vswitch2 |   |
|   \--++--/   | |   \--++--/   |
|  ||  | |  ||  |
\=OSA==OSA=/ \=OSA==OSA=/
   ||   ||
   ||   ||
   ||   ||
/--++--\ /--++--\
|  switch1 |-|  switch2 |
\--/ \--/


All IP addresses are in the same subnet and the vswitches are connected to
access ports on the switches.

Normally Linux1 has the common IP address, but when it becomes unavailable,
Linux2 should take over.
This process works, when Linux1 can normally terminate, or when it gets
logged off and CP cleans up its OSA IP registrations.
When it breaks, for instance with a kernel panic, then the Linux1 server
retains its registered IP addresses, so Linux2 should forcefully obtain the
common IP address.
To be sure that that happens, the common IP address is registered in Linux
with the qethconf ipa add ip_address command.

In the situation, were the take over is forcefully (eg, Linux1 has the IP
address still registered), something strange happens.
On VM1's vswitch and OSAs, the common IP address remains registered.
But on VM2, the vswitch shows the IP address registered, but with a local
flag and the console of the vswitch controller shows the familiar Return
code E00A from SETIP for IPv4 error, indicating it could not register the
IP address to the switch.

We are running z/VM 5,2 and the VMLAN level is VM63989.
The OSAs are OSA-Direct Express Gigabit Ethernet types and the vswitches are
defined with only the RDEV parameters.

Does anyone know how to make the IP take over being forwarded to the real
switches and then to the other vswitch?

Ronald van der Laan

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: IP takeover across lpars fails through a vswitch

2007-09-06 Thread Alan Altmark
On Thursday, 09/06/2007 at 09:15 EDT, Ronald van der Laan
[EMAIL PROTECTED] wrote:

 VM1  VM2
 /==\ /==\
 |  | |  |
 |   /--\   | |   /--\   |
 |   |  Linux1  |   | |   |  Linux2  |   |
 |   \+-/   | |   \+-/   |
 || | || |
 || | || |
 |   /+-\   | |   /+-\   |
 |   | vswitch1 |   | |   | vswitch2 |   |
 |   \--++--/   | |   \--++--/   |
 |  ||  | |  ||  |
 \=OSA==OSA=/ \=OSA==OSA=/
 ||   ||
 ||   ||
 ||   ||
 /--++--\ /--++--\
 |  switch1 |-|  switch2 |
 \--/ \--/

A picture.  May fortune smile upon you forever and ever.

 Normally Linux1 has the common IP address, but when it becomes
unavailable,
 Linux2 should take over.

 [snip]

 In the situation, were the take over is forcefully (eg, Linux1 has the
IP
 address still registered), something strange happens.
 On VM1's vswitch and OSAs, the common IP address remains registered.
 But on VM2, the vswitch shows the IP address registered, but with a
local
 flag and the console of the vswitch controller shows the familiar
Return
 code E00A from SETIP for IPv4 error, indicating it could not register
the
 IP address to the switch.

This is normal in a Layer 3 VSWITCH, where you have split brain.  The
host is dead but the network adapter is still responding to ARPs.  This
prevents the other OSAs from (completely) registering the IP as they know
that it is not proper to have two NICs responding to ARPs.

 Does anyone know how to make the IP take over being forwarded to the
real
 switches and then to the other vswitch?

Operate your VSWITCH as ETHERNET (layer 2) and this goes away since IP
addresses are no longer registered in the OSAs and there is no longer a
split brain.  When the owning host dies, so dies its ability to respond
to ARPs.

Alan Altmark
z/VM Development
IBM Endicott

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: VSwitch and IPv6

2007-09-06 Thread Robert J Brenneman
Yep - you need Layer2 - Setup the vswitch like Alan mentioned. BUT: the osa
port can **not** support layer2  layer3 at the same time. If all your ports
are in use as layer3 at the moment, you'll have to free one up to initialize
it in layer2. The first connection to the osa sets the mode, and everyone
else who shares it has to follow suit.

To get the Linux driver in Layer 2 mode you have to stick a value a file,
but that varies depending on which distribution youre using.

for RHEL5: *OPTIONS=layer2=1* in /etc/sysconfig/network-scripts/ifcfg-ethX
*

*for SLES: QETH_LAYER2_SUPPORT=1 in /etc/sysconfig/hardware/hwcfg-
qeth-bus-ccw-0.0.

I pulled that from Mark Ver's  RHEL4 / SLES9 configuration cross reference
at http://linuxvm.org/present/SHARE107/S9211mv.pdf

RHEL 5  SLES 10 should be close enough to try the same things on.

--
Jay Brenneman

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Hitachi DASD subsystem Replication - anyone?

2007-09-06 Thread Bennie Hicks

Dennis, thanks for the reply.  Yes, it would be very nice if the native
FLASHCOPY command set would work, but we were told point blank from some
HDS development team members on a conference call inquiring on just that
yesterday, that it is not compatible.

We have started to review the ShadowImage doc, and will most likely
pursue this option.  I noticed you indicated full volume.  I keep
getting conflicting responses from HDS, but one technical guy said that
it will work with mini-disks, but the conference call HDS team yesterday
contradicted that. I suppose we are on our own again to find out.

Anybody out there ever experimented with minidisk scenario?



O'Brien, Dennis L wrote:


Bennie,
We use ShadowImage to replicate VM volumes on a USP 600.  I don't know
what differences there may be between a 600 and an 1100.  ShadowImage
makes full volume copies, using ICKDSF PPRC commands.  We have no
problem issuing the commands from VM.  Hitachi also offers something
called compatible FlashCopy.  It's extra cost, so we don't have it.
If it's truly compatible, it should allow CP FLASHCOPY commands for both
minidisks and full volumes.

  Dennis O'Brien

Chelsea Clinton asked a returning US Soldier about fear.  He said there
were only three things he was afraid of: Osama, Obama and Yo Mama.  --
Truckee Tahoe Times


-Original Message-
From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, September 05, 2007 07:19
To: LINUX-390@VM.MARIST.EDU
Subject: Hitachi DASD subsystem Replication - anyone?

Background:  in a predominently zOS sysplex environment (2 z9's) and a
fairly large Open Systems environment (Linux, Solaris, AIX, Windoz), a
recent storage subsystem consolidation/upgrade decision was made to
purchase an Hitachi USP1100 on a large tiered storage platform.

Problem : with zVM and zLinux, while growing rapidly, it doesn't yet get
the *attention* it needs considering resources and tools.   Example, we
have been running around 4 years on 2 IFL's on an old DASD subsystem
nobody else wanted, STK V960, and now integrating into the Hitachi world
the methods of storage replication was an after thought. The STK V960,
while older an *unwanted* at least offered a snapshot feature with a
VM interface for controlling replication, and Hitachi is telling us
(short of experiment yourself with ICKDSF on a full volume level) none
of their replication products have a native VM interface - specifically,
we desire access at the minidisk level vs. full volume.  We basically
use full volume 3390 emulation, but reserve CYL 0 for unique volser,
such that the replication involves zOS shared DASD full volume dumps
of snapshot target volser's, and zVM uses internally for cloning guests
(vs. DDR's).

Question for LIST: Is anybody out there using a Hitachi USP subsystem
for the zVM storage, and if so, how are you handling volume replication?
Hitachi indicated that they had *heard* that some customers were running
zOS as a guest machine under zVM, but this seems impossible to justify
for us in that the reduced VM license cost for IFL would no longer be an
option, plus the zOS licensing to boot.

Any ideas or experiences out there would be appreciated for
consideration.  Thanks

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or
visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390




--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Fedora-DS on Linux for SYstem z

2007-09-06 Thread Mark Post
 On Thu, Sep 6, 2007 at  6:05 AM, in message [EMAIL PROTECTED],
Massimiliano Belardi [EMAIL PROTECTED] wrote: 
 Hi Guys,
 does anybody know if Fedora-DS is included on RedHat for Linux
 distribution? Anybody tryied to compile it from source to System z platform?

What is it?  If the package name contains the string fed then I didn't see it 
on the RHEL5 DVD.


Mark Post

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Fedora-DS on Linux for SYstem z

2007-09-06 Thread Tom Shilson
Fedora-DS is Fedora Directory Server, an open-source LDAP server.  That is
all I know.

Tom Shilson
Powered by Penguins
Unix Team / IT Server Services
Tel:  651-733-7591   tshilson at mmm dot com
Fax:  651-736-7689

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Hitachi DASD subsystem Replication - anyone?

2007-09-06 Thread David Boyes
 Dennis, thanks for the reply.  Yes, it would be very nice if the
native
 FLASHCOPY command set would work, but we were told point blank from
some
 HDS development team members on a conference call inquiring on just
that
 yesterday, that it is not compatible.

Not surprising. They really don't understand VM very well. 

 We have started to review the ShadowImage doc, and will most likely
 pursue this option.  I noticed you indicated full volume.  I keep
 getting conflicting responses from HDS, but one technical guy said
that
 it will work with mini-disks, but the conference call HDS team
yesterday
 contradicted that. I suppose we are on our own again to find out.
 Anybody out there ever experimented with minidisk scenario?

The one USP box I have access to that has the current ucode installed
did not permit minidisk replication, only full volumes. 

I think I'd complain loudly to HDS. This is one case where they *need*
to buy a clue and support CMS tools to manage this stuff, or get their
boxes to support the native command sets to trigger this stuff, even if
it requires licensing IBM IP to do it. 

I'm told IBM, STK and EMC have nice tradein programs for HDS boxes. You
could threaten them with that; they generally respond to that..8-)

-- db

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Fedora-DS on Linux for SYstem z

2007-09-06 Thread Max Belardi

Mark Post ha scritto:

On Thu, Sep 6, 2007 at  6:05 AM, in message [EMAIL PROTECTED],


Massimiliano Belardi [EMAIL PROTECTED] wrote:


Hi Guys,
does anybody know if Fedora-DS is included on RedHat for Linux
distribution? Anybody tryied to compile it from source to System z platform?



What is it?  If the package name contains the string fed then I didn't see it 
on the RHEL5 DVD.


Mark Post

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390




Is the Directory Server...
http://directory.fedoraproject.org/

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Fedora-DS on Linux for SYstem z

2007-09-06 Thread David Boyes
  What is it?  If the package name contains the string fed then I
didn't
 see it on the RHEL5 DVD.

http://www.directory.fedora.redhat.com/wiki/Documentation

It does build cleanly from source on RHEL5 (although it takes a
gawd-awful amount of CPU to do it -- *definitely* don't do this during
the day if you don't have CPU to burn). 

As to what it does, it's basically an integrated LDAP server that makes
things like replicating from Active Directory and gives you Linux based
management tools for the environment, so the Linux and Windows
environment can get along better. The tools are still a bit flaky in
places, but it's got lots of docs and seems to work OK. 

At some point, it'd probably be worth creating an appliance out of this
thing as an integration point to ease transition to Linux-based
environments. 

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Fedora-DS on Linux for SYstem z

2007-09-06 Thread Mark Post
 On Thu, Sep 6, 2007 at 10:24 AM, in message
[EMAIL PROTECTED], Tom
Shilson [EMAIL PROTECTED] wrote: 
 Fedora-DS is Fedora Directory Server, an open-source LDAP server.  That is
 all I know.

Tom, Thanks.  I found the package on the Fedora download page.  The name starts 
with fedora-ds so it doesn't seem to be on RHEL5.  I tried to build it from 
source on one of my Slack/390 systems, but it wanted at least one package I 
don't build, which is the Mozilla LDAP SDK.  So, I can't say if it will build 
cleanly on s390/s390x or not.


Mark Post

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Fedora-DS on Linux for SYstem z

2007-09-06 Thread Adam Thornton

On Sep 6, 2007, at 7:24 AM, Tom Shilson wrote:


Fedora-DS is Fedora Directory Server, an open-source LDAP server.
That is
all I know.


If it's not, OpenLDAP is certainly available and works quite well.

Adam

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Fedora-DS on Linux for SYstem z

2007-09-06 Thread McKown, John
 -Original Message-
 From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On 
 Behalf Of David Boyes
 Sent: Thursday, September 06, 2007 9:57 AM
 To: LINUX-390@VM.MARIST.EDU
 Subject: Re: Fedora-DS on Linux for SYstem z
 
 
   What is it?  If the package name contains the string fed then I
 didn't
  see it on the RHEL5 DVD.
 
 http://www.directory.fedora.redhat.com/wiki/Documentation
 
 It does build cleanly from source on RHEL5 (although it takes a
 gawd-awful amount of CPU to do it -- *definitely* don't do this during
 the day if you don't have CPU to burn). 
 
 As to what it does, it's basically an integrated LDAP server 
 that makes
 things like replicating from Active Directory and gives you 
 Linux based
 management tools for the environment, so the Linux and Windows
 environment can get along better. The tools are still a bit flaky in
 places, but it's got lots of docs and seems to work OK. 
 
 At some point, it'd probably be worth creating an appliance 
 out of this
 thing as an integration point to ease transition to Linux-based
 environments. 
 

Would this be a case for having a z/Linux hosted on Hercules/390 on a
x86 platform? I don't see the need for the reliability and scalability
for this sort of thing. This test environment could be accessable via
NFS or some other method to actually copy compiled modules to the real
System z environment. Of course, it would not be useful for actual
system level testing, but for just compiling and initial testing, it
might be useful.

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it. 

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Fedora-DS on Linux for SYstem z

2007-09-06 Thread Mark Post
 On Thu, Sep 6, 2007 at 10:56 AM, in message
[EMAIL PROTECTED], David
Boyes [EMAIL PROTECTED] wrote: 
-snip-
 http://www.directory.fedora.redhat.com/wiki/Documentation
 
 It does build cleanly from source on RHEL5 (although it takes a
 gawd-awful amount of CPU to do it -- *definitely* don't do this during
 the day if you don't have CPU to burn). 

I suspect that's because this is the rebranding of the Netscape Directory 
Server that Red Hat bought so many moons ago.  (Hence the reliance on so many 
thinks like nspr, nss, Mozilla  LDAP SDK, etc.)  As one who's built 
Netscape/Mozilla packages any number of times, I can tell you they _all_ suck 
CPU horribly.


Mark Post

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Fedora-DS on Linux for SYstem z

2007-09-06 Thread Mark Post
 On Thu, Sep 6, 2007 at 12:32 PM, in message
[EMAIL PROTECTED], McKown,
John [EMAIL PROTECTED] wrote: 
-snip-
 Would this be a case for having a z/Linux hosted on Hercules/390 on a
 x86 platform? I don't see the need for the reliability and scalability
 for this sort of thing. This test environment could be accessable via
 NFS or some other method to actually copy compiled modules to the real
 System z environment. Of course, it would not be useful for actual
 system level testing, but for just compiling and initial testing, it
 might be useful.

I would say no.  It would be far better to do cross-compiles, rather than 
emulating an entire architecure to do native compiles.


Mark Post

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Fedora-DS on Linux for SYstem z

2007-09-06 Thread David Boyes
 Would this be a case for having a z/Linux hosted on Hercules/390 on a
 x86 platform? I don't see the need for the reliability and scalability
 for this sort of thing. 

I would say that something like a Fedora-DS appliance probably isn't the
place you'd make that argument. If you're going to do something like
that involving any Intel system, you should skip the 390 emulation and
just do it directly on the Intel system. Directory servers are usually
high-utilization boxes, particularly busy ones that also host the
database back end. 

Wrt to using Herc on Intel boxes as a compile farm, again, just use the
cross-compilation tools that are already in gcc and run it native. Gcc
has the capability to generate object code for any architecture it
supports (provided you have the right libraries and header files
available) as part of the basic structure of the compiler. You don't
need to emulate the entire environment if you're just going to build
modules (and it's a lot faster that way). 

 Of course, it would not be useful for actual
 system level testing, but for just compiling and initial testing, it
 might be useful.

For general experimentation, maybe. Otherwise, get z/VM. It's a more
effective way to do testing, and you can just go and deploy it via DDR
once you're done. 

Now, if we're convincing IBM to license VM on Herc, that's a different
story...8-)

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: NPIV FCP connections through Multiple FC Switches

2007-09-06 Thread Craig Collins
We stumbled across the answer and wanted to document it here in case someone
else runs into this problem in the future.  The physical port on the z9 had
to be added to the zone definition on the switches before we could get it to
log into the remote storage through the remote switch.  The z9 WWPN did not
need to be in the zone definition if only the local switch was used.

Craig Collins
State of Wisconsin

On 9/6/07, Craig Collins [EMAIL PROTECTED] wrote:

 We're running into a configuration issue trying to get NPIV FCP
 connections to work through a switched fabric distributed across two
 locations.  At our primary location, the z9 FCP is connected into Switch #1,
 a McData 3232 switch.  We have EMC DMX3 storage connected to Switch #1 as
 well and are able to get the NPIV id logged onto the fabric, provisioned,
 and connecting to the storage without a problem.  We have Linux guests
 booting off of the SAN and are not using 3390 disk for them.  We setup the
 switch binding and added the WWPN of the z9 port as a detached node on
 switch #1 to get this to work.  That's the good news.

 The problem we are having is getting the NPIV id logged into our backup
 location DMX3 which is connected to Switch #2, another McData 3232 switch
 ISL'd to Switch #1.  We thought we had a setting incorrect on the switches
 so that the traffic is not making it all the way to the second DMX3, however
 when we use the SCSIDISC utility under VM against the device which
 corresponds to the NPIV id, it actually detects the storage port on the DMX3
 but the DMX3 shows that we are not logged into the storage port with the
 NPIV.  We've tried multiple settings on the switches to get this connected,
 but without any success.  We have the NPIV and Switch Binding features
 active on both McData 3232 switches even though I believe we only need NPIV
 on the switch that the z9 port physically connects to.

 Has anyone else done this and do you have suggestions as to settings we
 should look at?

 Craig Collins
 State of Wisconsin



--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Fedora-DS on Linux for SYstem z

2007-09-06 Thread David Boyes
 I suspect that's because this is the rebranding of the Netscape
Directory
 Server that Red Hat bought so many moons ago.  

Ah. Yes, that would explain the distinct odor of frying bacon from the
machine room. 

Playing with it, it's actually kind of nice -- the UI is something that
could be loosed on an unwary Windows admin without a lot of
re-education. Goes well with our clustered MySQL appliance with a little
tinkering. 

- db

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


UNSCRIBE

2007-09-06 Thread Huegel, Thomas
UNSCRIBE



__
 ella for Spam Control  has removed VSE-List messages and set aside
VM-List for me
You can use it too - and it's FREE!  http://www.ellaforspam.com

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: FTPS (FTP over SSL) Package for SLES9

2007-09-06 Thread José L . Ramírez
I will like to see the curl command line.

Regards,

Jose

-Original Message-
From: Clark, Douglas [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 05, 2007 8:35 PM
To: LINUX-390@VM.MARIST.EDU
Subject: Re: FTPS (FTP over SSL) Package for SLES9

I was unsuccessful in getting this script to work.  However, that could have 
been because all ftp traffic from my Linux system's IP Address was blocked at 
the firewall.  After that restriction was lifted, I tried and successfully 
transmitted a file via ftp over ssl using curl.  It worked beautifully.  
Thanks to all who shared their information with me.  If anyone is interested I 
would be happy to send the curl command line I used but after I was directed to 
try that utility it was pretty easy to figure out the command syntax.

Doug


-Original Message-
From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of José L. Ramírez
Sent: Tuesday, August 28, 2007 12:24 PM
To: LINUX-390@VM.MARIST.EDU
Subject: Re: FTPS (FTP over SSL) Package for SLES9

Hi Mark,

 

This simple ckermit script receives several values as parameters (ip, port, 
user, etc.), it basically uploads the contents of a local directory, it will 
use TLS:

 

#!/usr/bin/kermit +

 

  SET FTP VERBOSE-MODE ON

  SET FTP AUTHTYPE TLS

  SET AUTH TLS CERTS-OK

  SET FTP AUTOAUTHENTICATION OFF

 

  SET TRANSACTION-LOG BRIEF

  LOG TRANSACTIONS /var/kermit_ftp.log APPEND

 

  .ip := \fcontents(\%1)

  .port   := \fcontents(\%2)

  .user   := \fcontents(\%3)

  .password   := \fcontents(\%4)

  .ldirectory := \fcontents(\%5)

  .rdirectory := \fcontents(\%6)

 

  ftp open \%1 \%2 /user:\%3 /password:\%4

  if fail exit 1 \%1: Connection failed

  if not \v(ftp_loggedin) exit 1 Login failed

 

  lcd \m(ldirectory)

  if fail exit 1 lcd: \v(errstring)

 

  ftp cd \m(rdirectory)   ; CD to desired server directory

  if fail exit 1 cd: \v(errstring)

 

  ftp mput /delete *

  if fail exit 1 ftp mput *: \v(ftp_message)

 

  ftp bye

 

  close transaction-log   ; Close log

  exit

 

 

 

Jose

 

-Original Message-
From: Mark Post [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 28, 2007 2:48 PM
To: LINUX-390@VM.MARIST.EDU
Subject: Re: FTPS (FTP over SSL) Package for SLES9

 

 On Tue, Aug 28, 2007 at  2:30 PM, in message

[EMAIL PROTECTED], José

L.

Ramírez [EMAIL PROTECTED] wrote: 

 Opps, sorry, I didn't notice that what Douglas needs is an FTP SSL

client.

  

 Based on that I think that the ckermit package that comes with SLES9

will 

 help you. We currently use the package to automatically download

files from a 

 FTP/SSL site. It provides lots of scripting capabilities... if you

need some 

 scripts examples just let me know...

 

I don't know if Douglas needs some script samples, but I would like to

see a few small ones, particularly how the SSL/TLS aspect gets invoked

within an FTP session.

 

 

Mark Post

 

--

For LINUX-390 subscribe / signoff / archive access instructions,

send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit

http://www.marist.edu/htbin/wlvindex?LINUX-390

 

 

Scanned by McAfee SCM1



Scanned by Triple-S SCM1

-
*Attention*
This electronic message, including any attachments, contains information that 
may be legally confidential and/or privileged. The information is intended 
solely for the individual or entity named above and access by anyone else is 
unauthorized. If you are not the intended recipient, any disclosure, copying, 
distribution, or use of the contents of this information is prohibited and may 
be unlawful. If you have received this electronic transmission in error, please 
reply immediately to the sender that you have received the message in error and 
delete it from your system.

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Scanned by McAfee SCM1



Scanned by Triple-S SCM1

-
*Attention*
This electronic message, including any attachments, contains
information that may be legally confidential and/or privileged. The
information is intended solely for the individual or entity named
above and access by anyone else is unauthorized. If you are not the
intended recipient, any disclosure, copying, distribution, or use
of the contents of this information is prohibited and may be
unlawful. If you have received this electronic transmission in
error, please reply immediately to the sender that you have
received the message in error and delete it from your system.

Re: Fedora-DS on Linux for SYstem z

2007-09-06 Thread Evans, Kevin R
Boy, I haven't heard it called a machine room for eons. You are
showing your age here, David.

G

Kevin

-Original Message-
From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of
David Boyes
Sent: Thursday, September 06, 2007 12:44 PM
To: LINUX-390@VM.MARIST.EDU
Subject: Re: Fedora-DS on Linux for SYstem z

 I suspect that's because this is the rebranding of the Netscape
Directory
 Server that Red Hat bought so many moons ago.

Ah. Yes, that would explain the distinct odor of frying bacon from the
machine room.

Playing with it, it's actually kind of nice -- the UI is something that
could be loosed on an unwary Windows admin without a lot of
re-education. Goes well with our clustered MySQL appliance with a little
tinkering.

- db

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or
visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Fedora-DS on Linux for SYstem z

2007-09-06 Thread David Boyes
 Boy, I haven't heard it called a machine room for eons. You are
 showing your age here, David.
 G

Vintage, laddie, vintage. 

I *improve* with age, particularly when influenced by bottles... 8-)

-- db

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Fedora-DS on Linux for SYstem z

2007-09-06 Thread Evans, Kevin R
Believe me, I speak vintage also g

K

-Original Message-
From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of
David Boyes
Sent: Thursday, September 06, 2007 1:16 PM
To: LINUX-390@VM.MARIST.EDU
Subject: Re: Fedora-DS on Linux for SYstem z

 Boy, I haven't heard it called a machine room for eons. You are
 showing your age here, David.
 G

Vintage, laddie, vintage.

I *improve* with age, particularly when influenced by bottles... 8-)

-- db

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or
visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


unsubscribe

2007-09-06 Thread Martin, Larry D
unsubscribe



..
This E-mail and any of its attachments may contain Prince George’s County 
Government or Prince George's County 7th Judicial Circuit Court proprietary 
information, which is privileged and confidential. This E-mail is intended 
solely for the use of the individual or entity to which it is addressed. If you 
are not the intended recipient of this E-mail, you are hereby notified that any 
dissemination, distribution, copying, or action taken in relation to the 
contents of and attachments to this E-mail is strictly prohibited and may be 
unlawful. If you have received this E-mail in error, please notify the sender 
immediately and permanently delete the original and any copy of this E-mail and 
any printout.


Novell Online Update for SLES 9 SP3?

2007-09-06 Thread David Stuart
Morning, 

I am having trouble reaching the Novell Online Update site via YOU.  I have 
used it before, successfully.  However, now I am receiving the following error 
message(s): 

ERROR:(Media:file not found)
HTTP return code:403 (URL:
https://stuartd2:[EMAIL 
PROTECTED]/update/s390/updates/SUSE-CORE/9/patches/directory.3)

Does this mean that the patches/updates are no longer available (I find that 
hard to believe)?  Or just that I no longer have access to them? 


Thanks, 
Dave 





Dave Stuart
Prin. Info. Systems Support Analyst
County of Ventura, CA
805-662-6731
[EMAIL PROTECTED]

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Novell Online Update for SLES 9 SP3?

2007-09-06 Thread Mark Post
 On Thu, Sep 6, 2007 at  2:50 PM, in message [EMAIL PROTECTED],
David Stuart [EMAIL PROTECTED] wrote: 
 Morning, 
 
 I am having trouble reaching the Novell Online Update site via YOU.  I have 
 used it before, successfully.  However, now I am receiving the following 
 error message(s): 
 
 ERROR:(Media:file not found)
 HTTP return code:403 (URL:
 https://stuartd2:[EMAIL PROTECTED]/update/s390/updates/SUSE-CORE/9/patc
 hes/directory.3)
 
 Does this mean that the patches/updates are no longer available (I find that 
 hard to believe)?  Or just that I no longer have access to them? 

You have the URL wrong.  It should be https://stuartd2:[EMAIL 
PROTECTED]/update/s390/update/SUSE-CORE/9/patches/directory.3


Mark Post

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Novell Online Update for SLES 9 SP3?

2007-09-06 Thread David Stuart
Hi Mark, 

The incorrect URL is a typo when I copied the error message.  

I am using Yast Online Update, and the only only URL specified is 
https://you.novell.com/update. 

When I press Next, I am prompted for my user-id and password, and then a few 
seconds later I receive an error box stating that Initialization failed.  Try 
again.  If the failure continues, choose another SuSE FTP/HTTP Server. 

When I press the Details button, I see the Media:file not found and HTTP 403, 
and the URL, which matches the one you listed. 

Ideas? 


Dave 



Dave Stuart
Prin. Info. Systems Support Analyst
County of Ventura, CA
805-662-6731
[EMAIL PROTECTED]

 Mark Post [EMAIL PROTECTED] 9/6/2007 12:07 PM 
 On Thu, Sep 6, 2007 at  2:50 PM, in message [EMAIL PROTECTED],
David Stuart [EMAIL PROTECTED] wrote: 
 Morning, 
 
 I am having trouble reaching the Novell Online Update site via YOU.  I have 
 used it before, successfully.  However, now I am receiving the following 
 error message(s): 
 
 ERROR:(Media:file not found)
 HTTP return code:403 (URL:
 https://stuartd2:[EMAIL PROTECTED]/update/s390/updates/SUSE-CORE/9/patc 
 hes/directory.3)
 
 Does this mean that the patches/updates are no longer available (I find that 
 hard to believe)?  Or just that I no longer have access to them? 

You have the URL wrong.  It should be https://stuartd2:[EMAIL 
PROTECTED]/update/s390/update/SUSE-CORE/9/patches/directory.3 


Mark Post

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390 

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Novell Online Update for SLES 9 SP3?

2007-09-06 Thread Kim Goldenberg

David Stuart wrote:

Hi Mark,

The incorrect URL is a typo when I copied the error message.

I am using Yast Online Update, and the only only URL specified is 
https://you.novell.com/update.

When I press Next, I am prompted for my user-id and password, and then a few seconds 
later I receive an error box stating that Initialization failed.  Try again.  If 
the failure continues, choose another SuSE FTP/HTTP Server.

When I press the Details button, I see the Media:file not found and HTTP 403, 
and the URL, which matches the one you listed.

Ideas?




Have you tried logging on to the NOVELL.COM site with your ID and
checking what happens to see if the ID  Password is still known to NOVELL?

Kim

--
Kim Goldenberg
Systems Programmer I
State of NJ - OIT
609-777-3722
[EMAIL PROTECTED]
[EMAIL PROTECTED]

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Missing OSA/2 Interfaces

2007-09-06 Thread David Stuart
Mark spent quite a bit of time working with me off-list, but we got the missing 
OSA/2 interfaces working again.  

The problem was a missing hotplug, due to a newbie error. 

I want to thank Mark for all the time he spent working on this with me. 


Dave 





Dave Stuart
Prin. Info. Systems Support Analyst
County of Ventura, CA
805-662-6731
[EMAIL PROTECTED]

 Mark Post [EMAIL PROTECTED] 9/3/2007 10:02 AM 
 Christian Langer [EMAIL PROTECTED] 09/03/07 5:23 AM  
 What I don't understand is, why you have to build an initrd? Isn't it
 sufficient to add the modules in /etc/modules?

Christian,

Because my memory of which distribution does insmod commands for the network 
interface in the initrd was faulty.  As it turns out, RHEL is the one that does 
it, not SLES.  Just FYI, SLES9 doesn't really use /etc/modprobe.conf, 
/etc/modules.conf, or /etc/modprobe.d/* for setting up OSA interfaces.  The 
module name is in /etc/sysconfig/hardware/hwcfg-{qeth,lcs}-bus-ccw-0.0..


Mark Post

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390 

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Novell Online Update for SLES 9 SP3?

2007-09-06 Thread David Stuart
Thanks Kim, 

I think it's a right/privileges issue.  I can sign on to the Novell web site, 
so it still knows my user-id/password, but when I try to download a patch, I 
receive a message that I don't have privileges to do so.  I've got a query in 
to our local guy who handles all this stuff with Novell. 


Dave 



Dave Stuart
Prin. Info. Systems Support Analyst
County of Ventura, CA
805-662-6731
[EMAIL PROTECTED]

 Kim Goldenberg [EMAIL PROTECTED] 9/6/2007 12:54 PM 
David Stuart wrote:
 Hi Mark,

 The incorrect URL is a typo when I copied the error message.

 I am using Yast Online Update, and the only only URL specified is 
 https://you.novell.com/update.

 When I press Next, I am prompted for my user-id and password, and then a few 
 seconds later I receive an error box stating that Initialization failed.  
 Try again.  If the failure continues, choose another SuSE FTP/HTTP Server.

 When I press the Details button, I see the Media:file not found and HTTP 403, 
 and the URL, which matches the one you listed.

 Ideas?



Have you tried logging on to the NOVELL.COM site with your ID and
checking what happens to see if the ID  Password is still known to NOVELL?

Kim

--
Kim Goldenberg
Systems Programmer I
State of NJ - OIT
609-777-3722
[EMAIL PROTECTED] 
[EMAIL PROTECTED] 

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390 

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Novell Online Update for SLES 9 SP3?

2007-09-06 Thread Mark Post
 On Thu, Sep 6, 2007 at  3:20 PM, in message [EMAIL PROTECTED],
David Stuart [EMAIL PROTECTED] wrote: 
-snip-
 When I press the Details button, I see the Media:file not found and HTTP 
 403, and the URL, which matches the one you listed. 

A 403 is an authorization failure, so it's entirely possible that your 
subscription has expired.  Check via NCC if that is true or not.  I don't know 
who your sales rep is, or I would advise you to contact them as well, since 
they should be able to look that up.


Mark Post

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


I am missing something basic with bash scripting.

2007-09-06 Thread James Melin
I am trying to get away from hard coded server names in a script using case for 
valid name check

This works but is not good because as soon as you add a new server to the NFS 
mountpoint list the script this is from has to be changed.

case $target_system in
  abinodji | calhoun | itasca | nokomis | pepin | phalen | vadnais | bemidji | 
millpond | mudlake | terrapin | hadley | hyland ) parm_1=valid;;
esac


So I tried several variants of this:

space= 
delim= | 
raw_list=`ls /clamscan/servers` #read list of mountpoints
cooked_list=$(echo $raw_list | sed -e s:$space:$delim:g) #replace space with 
case-happy delimiters
echo Raw list = $raw_list
echo cooked list = $cooked_list
case $target_system in
  $cooked_list ) parm_1=valid ;;
esac

But even though the display of 'cooked_list' seems to be what I want it to be, 
this never returns a match.

Anyone see where I missed the turnip truck on this?

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Novell Online Update for SLES 9 SP3?

2007-09-06 Thread CWells Jackson
Try 'http://youfix.novell.com/youfix' first
after the youfix has installed then try
https://you.novell.com/update
--- David Stuart [EMAIL PROTECTED] wrote:

 Hi Mark, 
 
 The incorrect URL is a typo when I copied the error
 message.  
 
 I am using Yast Online Update, and the only only URL
 specified is https://you.novell.com/update. 
 
 When I press Next, I am prompted for my user-id and
 password, and then a few seconds later I receive an
 error box stating that Initialization failed.  Try
 again.  If the failure continues, choose another
 SuSE FTP/HTTP Server. 
 
 When I press the Details button, I see the
 Media:file not found and HTTP 403, and the URL,
 which matches the one you listed. 
 
 Ideas? 
 
 
 Dave 
 
 
 
 Dave Stuart
 Prin. Info. Systems Support Analyst
 County of Ventura, CA
 805-662-6731
 [EMAIL PROTECTED]
 
  Mark Post [EMAIL PROTECTED] 9/6/2007 12:07 PM
 
  On Thu, Sep 6, 2007 at  2:50 PM, in message
 [EMAIL PROTECTED],
 David Stuart [EMAIL PROTECTED] wrote: 
  Morning, 
  
  I am having trouble reaching the Novell Online
 Update site via YOU.  I have 
  used it before, successfully.  However, now I am
 receiving the following 
  error message(s): 
  
  ERROR:(Media:file not found)
  HTTP return code:403 (URL:
 

https://stuartd2:[EMAIL PROTECTED]/update/s390/updates/SUSE-CORE/9/patc
 
  hes/directory.3)
  
  Does this mean that the patches/updates are no
 longer available (I find that 
  hard to believe)?  Or just that I no longer have
 access to them? 
 
 You have the URL wrong.  It should be

https://stuartd2:[EMAIL 
PROTECTED]/update/s390/update/SUSE-CORE/9/patches/directory.3
 
 
 
 Mark Post
 

--
 For LINUX-390 subscribe / signoff / archive access
 instructions,
 send email to [EMAIL PROTECTED] with the
 message: INFO LINUX-390 or visit
 http://www.marist.edu/htbin/wlvindex?LINUX-390 
 

--
 For LINUX-390 subscribe / signoff / archive access
 instructions,
 send email to [EMAIL PROTECTED] with the
 message: INFO LINUX-390 or visit
 http://www.marist.edu/htbin/wlvindex?LINUX-390
 


This is a new Website for over the counter drugs (OTC), please visit at 
WWW.DiscountMedsInc.com


  

Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel 
and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: I am missing something basic with bash scripting.

2007-09-06 Thread Mark Post
 On Thu, Sep 6, 2007 at  4:53 PM, in message
[EMAIL PROTECTED],
James Melin [EMAIL PROTECTED] wrote: 
-snip-
 raw_list=`ls /clamscan/servers` #read list of mountpoints
-snip-
 But even though the display of 'cooked_list' seems to be what I want it to 
 be, this never returns a match.
 
 Anyone see where I missed the turnip truck on this?

I'm guessing that if you subsitute /bin/ls instead of just ls (and change the 
whole thing to $(/bin/ls /clamscan/servers) to satisfy Adam) that thing will 
work better.  I think you're likely getting trailing /es on the end of the 
names, but that's not how you're passing in target_system.


Mark Post

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: I am missing something basic with bash scripting.

2007-09-06 Thread James Melin
I'll try that however my echo's are not revealing that to be the case.
Stay tuned.




 Mark Post [EMAIL PROTECTED]
 Sent by: Linux on 390 Port
 LINUX-390@VM.MARIST.EDU  
   To
 
LINUX-390@VM.MARIST.EDU

   cc
 09/06/2007 04:07 PM

  Subject
 Re: I am 
missing something basic with bash scripting.
Please respond to
   Linux on 390 Port LINUX-390@VM.MARIST.EDU








 On Thu, Sep 6, 2007 at  4:53 PM, in message
[EMAIL PROTECTED],
James Melin [EMAIL PROTECTED] wrote:
-snip-
 raw_list=`ls /clamscan/servers` #read list of mountpoints
-snip-
 But even though the display of 'cooked_list' seems to be what I want it to
 be, this never returns a match.

 Anyone see where I missed the turnip truck on this?

I'm guessing that if you subsitute /bin/ls instead of just ls (and change the 
whole thing to $(/bin/ls /clamscan/servers) to satisfy Adam) that
thing will work better.  I think you're likely getting trailing /es on the 
end of the names, but that's not how you're passing in target_system.


Mark Post

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: I am missing something basic with bash scripting.

2007-09-06 Thread Fargusson.Alan
The problem is that bash takes cooked_list as a single token in the case 
statement.  It matches the entire list of systems, and not each member of the 
list.  I don't know of any way around this.  You will probably need to do 
another for loop on raw_list and check for a match in the loop.

-Original Message-
From: Linux on 390 Port [mailto:[EMAIL PROTECTED] Behalf Of
James Melin
Sent: Thursday, September 06, 2007 1:53 PM
To: LINUX-390@VM.MARIST.EDU
Subject: I am missing something basic with bash scripting.


I am trying to get away from hard coded server names in a script using case for 
valid name check

This works but is not good because as soon as you add a new server to the NFS 
mountpoint list the script this is from has to be changed.

case $target_system in
  abinodji | calhoun | itasca | nokomis | pepin | phalen | vadnais | bemidji | 
millpond | mudlake | terrapin | hadley | hyland ) parm_1=valid;;
esac


So I tried several variants of this:

space= 
delim= | 
raw_list=`ls /clamscan/servers` #read list of mountpoints
cooked_list=$(echo $raw_list | sed -e s:$space:$delim:g) #replace space with 
case-happy delimiters
echo Raw list = $raw_list
echo cooked list = $cooked_list
case $target_system in
  $cooked_list ) parm_1=valid ;;
esac

But even though the display of 'cooked_list' seems to be what I want it to be, 
this never returns a match.

Anyone see where I missed the turnip truck on this?

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: I am missing something basic with bash scripting.

2007-09-06 Thread Edmund R. MacKenty
On Thursday 06 September 2007 16:53, James Melin wrote:
I am trying to get away from hard coded server names in a script using case
 for valid name check

This works but is not good because as soon as you add a new server to the
 NFS mountpoint list the script this is from has to be changed.

case $target_system in
  abinodji | calhoun | itasca | nokomis | pepin | phalen | vadnais | bemidji
 | millpond | mudlake | terrapin | hadley | hyland ) parm_1=valid;; esac


So I tried several variants of this:

space= 
delim= | 
raw_list=`ls /clamscan/servers` #read list of mountpoints
cooked_list=$(echo $raw_list | sed -e s:$space:$delim:g) #replace space
 with case-happy delimiters echo Raw list = $raw_list
echo cooked list = $cooked_list
case $target_system in
  $cooked_list ) parm_1=valid ;;
esac

But even though the display of 'cooked_list' seems to be what I want it to
 be, this never returns a match.

Anyone see where I missed the turnip truck on this?

Yup: your $cooked_list inside that case statement represents a single pattern
whose value is a set of words separated by vertical bar characters and
whitespace.  What you want it to be is a list of separate patterns.  You see,
the shell breaks that case statement apart into words before doing parameter
substitutions, so it expects to parse the vertical bars separating multiple
patterns in a case before it expands that variable.

You could use eval to handle this, but there is a better way.  Don't use case
at all.  Define a simple InList() function that tells you if a given value is
in a list of values.  I use this in scripts all the time:

# Function to determine if a value is in a list of values.  The arguments
# are the value to check, and one or more other values which are the list
# to look for that first value in.  Returns zero if the first argument is
# repeated as any subsequent argument, or one if it is not.
InList()
{
local value=$1
shift
while [ $# -ne 0 ]
do  if [ $1 = $value ]; then return 0; fi
shift
done
return 1
}

Note that this function uses only shell built-in commands, so it is pretty
efficient.  To get your list of known servers, do this:

Servers=$('ls' /clamscan/servers)

Note that I'm using $(...) instead of backticks.  Backticks are evil!  I'm
also quoting the ls command to avoid any alias expansions, or you could
explicitly invoke /bin/ls.  Now you can do your check like this:

if InList $target_system $Servers
thenparm_1=valid
fi

I encourage you to use functions extensively in your shell scripts.  They make
the code much easier to read!  You can use function arguments, the standard
input, and global variables as inputs to functions, and the return code,
standard output and global variables as outputs.  I don't recommend using
global variables other than as static inputs (eg. configuration values).
Here's a way to write InList() using standard input and output instead, which
shows the common idioms for doing that:

# Function to determine if a value is in a list of values.  The only argument
# is the value to check.  The standard input contains a list of other values
# to look for that first value in, one value per line.  Writes valid to the
# standard output if the argument is in the list on the standard input,
# otherwise there is no output.  There is no return value.
InList()
{
local item
while read item
do  if [ $item = $1 ]; then echo valid; return; fi
done
}

It would be used like this:

parm_1=$('ls' -1 /clamscan/servers | InList $target_system)

Note: that's a digit one option to ls, not an ell, to force the output to
have one server name per line.  This example does the same as the first
version, but is less efficient because it uses I/O mechanisms.  If you know
your server list is not going to be very long ( 10K bytes), then use the
first method.  If you want to handle lists of arbitrary size, use the I/O
method.
- MacK.
-
Edmund R. MacKenty
Software Architect
Rocket Software, Inc.
Newton, MA USA

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: I am missing something basic with bash scripting.

2007-09-06 Thread James Melin
Ahh. I had seen an example in the o'reilly text 'learning the bash shell' that 
made it appear variable substitution in case was valid, but considering
they were using $PWD as the variable, indeed it would be the entire string.

I'll try the loop in the morning.  It would be nice if case DID work that way 
though.





 Fargusson.Alan [EMAIL PROTECTED]
 Sent by: Linux on 390 Port
 LINUX-390@VM.MARIST.EDU  
   To
 
LINUX-390@VM.MARIST.EDU

   cc
 09/06/2007 04:23 PM

  Subject
 Re: I am 
missing something basic with bash scripting.
Please respond to
   Linux on 390 Port LINUX-390@VM.MARIST.EDU








The problem is that bash takes cooked_list as a single token in the case 
statement.  It matches the entire list of systems, and not each member of the
list.  I don't know of any way around this.  You will probably need to do 
another for loop on raw_list and check for a match in the loop.

-Original Message-
From: Linux on 390 Port [mailto:[EMAIL PROTECTED] Behalf Of
James Melin
Sent: Thursday, September 06, 2007 1:53 PM
To: LINUX-390@VM.MARIST.EDU
Subject: I am missing something basic with bash scripting.


I am trying to get away from hard coded server names in a script using case for 
valid name check

This works but is not good because as soon as you add a new server to the NFS 
mountpoint list the script this is from has to be changed.

case $target_system in
  abinodji | calhoun | itasca | nokomis | pepin | phalen | vadnais | bemidji | 
millpond | mudlake | terrapin | hadley | hyland ) parm_1=valid;;
esac


So I tried several variants of this:

space= 
delim= | 
raw_list=`ls /clamscan/servers` #read list of mountpoints
cooked_list=$(echo $raw_list | sed -e s:$space:$delim:g) #replace space with 
case-happy delimiters
echo Raw list = $raw_list
echo cooked list = $cooked_list
case $target_system in
  $cooked_list ) parm_1=valid ;;
esac

But even though the display of 'cooked_list' seems to be what I want it to be, 
this never returns a match.

Anyone see where I missed the turnip truck on this?

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: I am missing something basic with bash scripting.

2007-09-06 Thread James Melin
This: (put it off into a little test script of its own)

parm_1=invalid
target_system=hadley
space= 
delim= | 
raw_list=$(/bin/ls /clamscan/servers)
cooked_list=$(echo $raw_list | sed -e s:$space:$delim:g)
echo Raw list = $raw_list
echo cooked list = $cooked_list
case $target_system in
  $cooked_list ) parm_1=valid ;;
esac

echo Parm_1 = $parm_1

produces:

Raw list = abinodji aitken albert bemidji calhoun hadley hyland itasca millpond 
mudlake nokomis pepin pequot phalen terrapin vadnais
cooked list = abinodji | aitken | albert | bemidji | calhoun | hadley | hyland 
| itasca | millpond | mudlake | nokomis | pepin | pequot | phalen |
terrapin | vadnais
Parm_1 = invalid





 Mark Post [EMAIL PROTECTED]
 Sent by: Linux on 390 Port
 LINUX-390@VM.MARIST.EDU  
   To
 
LINUX-390@VM.MARIST.EDU

   cc
 09/06/2007 04:07 PM

  Subject
 Re: I am 
missing something basic with bash scripting.
Please respond to
   Linux on 390 Port LINUX-390@VM.MARIST.EDU








 On Thu, Sep 6, 2007 at  4:53 PM, in message
[EMAIL PROTECTED],
James Melin [EMAIL PROTECTED] wrote:
-snip-
 raw_list=`ls /clamscan/servers` #read list of mountpoints
-snip-
 But even though the display of 'cooked_list' seems to be what I want it to
 be, this never returns a match.

 Anyone see where I missed the turnip truck on this?

I'm guessing that if you subsitute /bin/ls instead of just ls (and change the 
whole thing to $(/bin/ls /clamscan/servers) to satisfy Adam) that
thing will work better.  I think you're likely getting trailing /es on the 
end of the names, but that's not how you're passing in target_system.


Mark Post

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: I am missing something basic with bash scripting.

2007-09-06 Thread Eric Chevalier

On 9/6/2007 4:31 PM, Edmund R. MacKenty wrote:

Note that I'm using $(...) instead of backticks.  Backticks are evil!

The InList() function is slick; I like it!

But I'm curious: why are backticks evil? (I didn't know about the
$(command) trick; I've been using backticks for a long time. I learn
something new every day!)

Eric

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: I am missing something basic with bash scripting.

2007-09-06 Thread Stricklin, Raymond J
 parm_1=invalid
 target_system=hadley
 space= 
 delim= | 
 raw_list=$(/bin/ls /clamscan/servers)
 cooked_list=$(echo $raw_list | sed -e s:$space:$delim:g) 
 echo Raw list = $raw_list echo cooked list = $cooked_list 
 case $target_system in
   $cooked_list ) parm_1=valid ;;
 esac

My $0.028 --

 parm_1=invalid
 for system in `/bin/ls /clamscan/servers` ; do
  [ x$system = x$target_system ]  parm_1=valid
 done

ok
r.

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


http://www.marist.edu/htbin/wlvindex?LINUX-390

2007-09-06 Thread Larry Ploetz

I posted three responses with the wrong email address:


You could do something else entirely, like:

larry$ a=a
larry$ echo $list
a|b|c
larry$ [[ $list =~ $a ]]  echo hi || echo ho
hi
larry$ a=d
larry$ [[ $list =~ $a ]]  echo hi || echo ho
ho

or

[[ $(ls /clamscan/servers) =~ $target_system ]]  parm_1=valid

(assuming no system name is a subset of another system name. Otherwise:

[[ $(ls /clamscan/servers) =~ 
$target_system
 ]]  parm_1=valid

to ensure $target_system matches exactly and all of one file name in
/clamscan/servers, but the $target_system token has to be in the first
column.

or, of course, you could go the direct route:

[[ -f /clamscan/servers/$target_system ]]  parm_1=valid



Fargusson.Alan wrote:



The problem is that bash takes cooked_list as a single token in the
case statement.  It matches the entire list of systems, and not each
member of the list.  I don't know of any way around this.  You will
probably need to do another for loop on raw_list and check for a match
in the loop.



This is where eval comes in handy:

larry$ bash -c 'set -x; list=a|b|c; t=a; eval case $t in ( $list )
echo one;; b ) echo two;;  esac'
+ list='a|b|c'
+ t=a
+ eval 'case a in ( a|b|c ) echo one;; b ) echo two;; esac'
++ case a in
++ echo one
one

(although James would still have the problem of one system name being a
subset of another system name.)




Mark Post wrote:


If that doesn't help, then put a set -x right after the #!/bin/sh line, and 
send the output, along with the command invocation.




or put -x on the shebang line:

#! /bin/sh -x

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: I am missing something basic with bash scripting.

2007-09-06 Thread Mark Post
 On Thu, Sep 6, 2007 at  5:10 PM, in message
[EMAIL PROTECTED],
James Melin [EMAIL PROTECTED] wrote: 
 I'll try that however my echo's are not revealing that to be the case.
 Stay tuned.

If that doesn't help, then put a set -x right after the #!/bin/sh line, and 
send the output, along with the command invocation.


Mark Post

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: I am missing something basic with bash scripting.

2007-09-06 Thread Kielek, Samuel
This is probably the closest to what you're trying to do without getting
too fancy:

declare -a cooked_list=$(ls /clamscan/servers/)

for server in [EMAIL PROTECTED]; do
  if [ $server == $target_system ]; then
parm_1=valid
break
  else
parm_1=invalid
  fi
done


-Original Message-
From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of
James Melin
Sent: Thursday, September 06, 2007 5:10 PM
To: LINUX-390@VM.MARIST.EDU
Subject: Re: I am missing something basic with bash scripting.

I'll try that however my echo's are not revealing that to be the case.
Stay tuned.




 Mark Post [EMAIL PROTECTED]
 Sent by: Linux on 390 Port
 LINUX-390@VM.MARIST.EDU
To
 
LINUX-390@VM.MARIST.EDU
 
cc
 09/06/2007 04:07 PM
 
Subject
 Re:
I am missing something basic with bash scripting.
Please respond to
   Linux on 390 Port LINUX-390@VM.MARIST.EDU








 On Thu, Sep 6, 2007 at  4:53 PM, in message
[EMAIL PROTECTED]
n.us,
James Melin [EMAIL PROTECTED] wrote:
-snip-
 raw_list=`ls /clamscan/servers` #read list of mountpoints
-snip-
 But even though the display of 'cooked_list' seems to be what I want
it to
 be, this never returns a match.

 Anyone see where I missed the turnip truck on this?

I'm guessing that if you subsitute /bin/ls instead of just ls (and
change the whole thing to $(/bin/ls /clamscan/servers) to satisfy Adam)
that
thing will work better.  I think you're likely getting trailing /es on
the end of the names, but that's not how you're passing in
target_system.


Mark Post

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or
visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or
visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: I am missing something basic with bash scripting.

2007-09-06 Thread Fargusson.Alan
Because it is very hard to nest them.

-Original Message-
From: Linux on 390 Port [mailto:[EMAIL PROTECTED] Behalf Of
Eric Chevalier
Sent: Thursday, September 06, 2007 2:56 PM
To: LINUX-390@VM.MARIST.EDU
Subject: Re: I am missing something basic with bash scripting.


On 9/6/2007 4:31 PM, Edmund R. MacKenty wrote:
 Note that I'm using $(...) instead of backticks.  Backticks are evil!
The InList() function is slick; I like it!

But I'm curious: why are backticks evil? (I didn't know about the
$(command) trick; I've been using backticks for a long time. I learn
something new every day!)

Eric

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: I am missing something basic with bash scripting.

2007-09-06 Thread Edmund R. MacKenty
On Thursday 06 September 2007 17:56, Eric Chevalier wrote:
On 9/6/2007 4:31 PM, Edmund R. MacKenty wrote:
 Note that I'm using $(...) instead of backticks.  Backticks are evil!

The InList() function is slick; I like it!

But I'm curious: why are backticks evil? (I didn't know about the
$(command) trick; I've been using backticks for a long time. I learn
something new every day!)

I used to use backticks all the time too, but I never much liked them because
they are so easy to confuse with single-quotes, and on some proportional
fonts they are very hard to see, even.  When I found that even the Bourne
shells on UNIX systems all support $(...) for command substitutions, I
switched for good.

BTW: the best solution posted so far is Lary Ploetz's:

[[ -f /clamscan/servers/$target_system ]]  parm_1=valid

which avoids the entire is this value in this list problem completely.  Very
nice!

I would, however, use -e instead of -f, because the system name is probably a
directory, not a plain file.
- MacK.
-
Edmund R. MacKenty
Software Architect
Rocket Software, Inc.
Newton, MA USA

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: I am missing something basic with bash scripting.

2007-09-06 Thread Eric Chevalier

On 9/6/2007 5:04 PM, Fargusson.Alan wrote:

Because it is very hard to nest them.


Ah hah! I'd never thought about that.

Thanks!
Eric

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: http://www.marist.edu/htbin/wlvindex?LINUX-390

2007-09-06 Thread Kielek, Samuel
or, of course, you could go the direct route:

[[ -f /clamscan/servers/$target_system ]]  parm_1=valid


Yea, that's probably what I'd do. Although I think his path actually
terminates with a directory since his comment said it was a list of
mountpoints. In which case he'd want:

[[ -d /clamscan/servers/$target_system ]]  parm_1=valid


-Sam

-Original Message-
From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of
Larry Ploetz
Sent: Thursday, September 06, 2007 5:58 PM
To: LINUX-390@VM.MARIST.EDU
Subject: http://www.marist.edu/htbin/wlvindex?LINUX-390

I posted three responses with the wrong email address:



You could do something else entirely, like:

larry$ a=a
larry$ echo $list
a|b|c
larry$ [[ $list =~ $a ]]  echo hi || echo ho
hi
larry$ a=d
larry$ [[ $list =~ $a ]]  echo hi || echo ho
ho

or

[[ $(ls /clamscan/servers) =~ $target_system ]]  parm_1=valid

(assuming no system name is a subset of another system name. Otherwise:

[[ $(ls /clamscan/servers) =~ 
$target_system
 ]]  parm_1=valid

to ensure $target_system matches exactly and all of one file name in
/clamscan/servers, but the $target_system token has to be in the first
column.

or, of course, you could go the direct route:

[[ -f /clamscan/servers/$target_system ]]  parm_1=valid




Fargusson.Alan wrote:


 The problem is that bash takes cooked_list as a single token in the
 case statement.  It matches the entire list of systems, and not each
 member of the list.  I don't know of any way around this.  You will
 probably need to do another for loop on raw_list and check for a match
 in the loop.


This is where eval comes in handy:

larry$ bash -c 'set -x; list=a|b|c; t=a; eval case $t in ( $list )
echo one;; b ) echo two;;  esac'
+ list='a|b|c'
+ t=a
+ eval 'case a in ( a|b|c ) echo one;; b ) echo two;; esac'
++ case a in
++ echo one
one

(although James would still have the problem of one system name being a
subset of another system name.)





Mark Post wrote:

 If that doesn't help, then put a set -x right after the #!/bin/sh
line, and send the output, along with the command invocation.



or put -x on the shebang line:

#! /bin/sh -x

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or
visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: I am missing something basic with bash scripting.

2007-09-06 Thread Stricklin, Raymond J
 

 I would, however, use -e instead of -f, because the system 
 name is probably a directory, not a plain file.

indeed, then why not use -d ?

ok
r.

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: I am missing something basic with bash scripting.

2007-09-06 Thread Adam Thornton

On Sep 6, 2007, at 2:56 PM, Eric Chevalier wrote:


On 9/6/2007 4:31 PM, Edmund R. MacKenty wrote:

Note that I'm using $(...) instead of backticks.  Backticks are evil!

The InList() function is slick; I like it!

But I'm curious: why are backticks evil? (I didn't know about the
$(command) trick; I've been using backticks for a long time. I learn
something new every day!)


Backticks don't nest (without extensive and tricky escaping).  $() does.

Adam

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: I am missing something basic with bash scripting.

2007-09-06 Thread Larry Ploetz

Stricklin, Raymond J wrote:





I would, however, use -e instead of -f, because the system
name is probably a directory, not a plain file.



indeed, then why not use -d ?

ok
r.



Both good points -- use the operator best suited to the task. If you
want to make *sure* it's a file, use -f; if directory, use -d, if you
don't care if it's a file, directory, link, socket, door, device, block
or character special, etc, use -e

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: I am missing something basic with bash scripting.

2007-09-06 Thread McKown, John
 -Original Message-
 From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On 
 Behalf Of James Melin
 Sent: Thursday, September 06, 2007 3:53 PM
 To: LINUX-390@VM.MARIST.EDU
 Subject: I am missing something basic with bash scripting.
 
 
 I am trying to get away from hard coded server names in a 
 script using case for valid name check
 
 This works but is not good because as soon as you add a new 
 server to the NFS mountpoint list the script this is from has 
 to be changed.
 
 case $target_system in
   abinodji | calhoun | itasca | nokomis | pepin | phalen | 
 vadnais | bemidji | millpond | mudlake | terrapin | hadley | 
 hyland ) parm_1=valid;;
 esac
 
 
 So I tried several variants of this:
 
 space= 
 delim= | 
 raw_list=`ls /clamscan/servers` #read list of mountpoints
 cooked_list=$(echo $raw_list | sed -e s:$space:$delim:g) 
 #replace space with case-happy delimiters
 echo Raw list = $raw_list
 echo cooked list = $cooked_list
 case $target_system in
   $cooked_list ) parm_1=valid ;;
 esac
 
 But even though the display of 'cooked_list' seems to be what 
 I want it to be, this never returns a match.
 
 Anyone see where I missed the turnip truck on this?

I cannot answer your question. Perhaps the case does not allow the
delimiters with a shell variable? I don't know. the following should
work in place of the case construct, however. It has more overhead,
but should work.

echo ${raw_list} | egrep -q \${target_system}\  parm_1=valid

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it. 

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: Fedora-DS on Linux for SYstem z

2007-09-06 Thread John Summerfield

Massimiliano Belardi wrote:

Hi Guys,
   does anybody know if Fedora-DS is included on RedHat for Linux
distribution? Anybody tryied to compile it from source to System z
platform?
Thanks
Max


I did a bit of digging around, and concluded that when it's released for
RHEL it will be Red Hat Directory Server.

I also concluded that releases are distressingly infrequent:-(

Perhaps if some here joined a list and started asking questions about DS
on Z, it would inspire some more interest.


--

Cheers
John

-- spambait
[EMAIL PROTECTED]  [EMAIL PROTECTED]

Please do not reply off-list

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: I am missing something basic with bash scripting.

2007-09-06 Thread Larry Ploetz

Mark Post wrote:


If that doesn't help, then put a set -x right after the #!/bin/sh line, and 
send the output, along with the command invocation.




or put -x on the shebang line:

#! /bin/sh -x
--
Carnegie Institution - At the Frontiers of Science



Larry Ploetz
Systems Administrator
Carnegie Institution of Washington
Department of Plant Biology, TAIR
650 325 1521 x 296 [EMAIL PROTECTED]

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: I am missing something basic with bash scripting.

2007-09-06 Thread David Boyes
 On 9/6/2007 4:31 PM, Edmund R. MacKenty wrote:
  Note that I'm using $(...) instead of backticks.  Backticks are
evil!
 But I'm curious: why are backticks evil? (I didn't know about the
 $(command) trick; I've been using backticks for a long time. I learn
 something new every day!)

Some uppity young whippersnappers think the $() syntax is easier to
understand and convey to newbies, and are less subject to bonehead
editors replacing them with normal single quotes. 

Me, I just think they're justifiable revenge on ATT for the 3B2 and
SVR1. 

-- db

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: I am missing something basic with bash scripting.

2007-09-06 Thread Larry Ploetz

Fargusson.Alan wrote:

The problem is that bash takes cooked_list as a single token in the case 
statement.  It matches the entire list of systems, and not each member of the 
list.  I don't know of any way around this.  You will probably need to do 
another for loop on raw_list and check for a match in the loop.



This is where eval comes in handy:

larry$ bash -c 'set -x; list=a|b|c; t=a; eval case $t in ( $list )
echo one;; b ) echo two;;  esac'
+ list='a|b|c'
+ t=a
+ eval 'case a in ( a|b|c ) echo one;; b ) echo two;; esac'
++ case a in
++ echo one
one

(although James would still have the problem of one system name being a
subset of another system name.)
--
Carnegie Institution - At the Frontiers of Science



Larry Ploetz
Systems Administrator
Carnegie Institution of Washington
Department of Plant Biology, TAIR
650 325 1521 x 296 [EMAIL PROTECTED]

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: VSwitch and IPv6

2007-09-06 Thread Marcy Cortes
This is all confusing to me - this layer 2/3 stuff.  It was said to be not
allowed on the same card.   Then not on the same port?  Now OK on the same
port (given I have the latest and greatest z9 stuff, that's easy - someone
else gets to do that)?

Example needed please.  I'll give you a little picture but I'm a little
graphically challenged.

Scenario - I have 2 OSA cards.  2 ports on each (duh).  One port on each
going to a diff switch.

OSA1
port A  switch a
port B  switch b
OSA2
port A  switch a
port B  switch b

VM TCPIP stack has OSA1 portA and OSA2 portB - layer 3 (and some guest LAN,
but that doesn't matter).
VSWITCH Layer 3 has OSA1 portB and OSA2 portA

Can I add a Layer 2 vswitch here without disturbing what's there?
That is, define 1 more vswitch using addresses on OSA1 portB and OSA2 port
A?

Existing VSWITCH Layer 3 def looks like:
Define VSWITCH td6vsw1 rdev f400 f600 vlan 797 porttype trunk

Can I just add the layer 2 one with something like:
Define vswitch td6vsw2 rdev f410 f610 ETHERNET vlan 797 porttype trunk  
And then update Linux with *for SLES: QETH_LAYER2_SUPPORT=1 in
/etc/sysconfig/hardware/hwcfg-qeth-bus-ccw-0.0. 
And that'll work??

Or must I come up with some more ports.

Bonus points for explaining how I can get link aggregation involved :)


Marcy Cortes

This message may contain confidential and/or privileged information. If you
are not the addressee or authorized to receive this for the addressee, you
must not use, copy, disclose, or take any action based on this message or
any information herein. If you have received this message in error, please
advise the sender immediately by reply e-mail and delete this message. Thank
you for your cooperation.


-Original Message-
From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of Alan
Altmark
Sent: Thursday, September 06, 2007 9:36 PM
To: LINUX-390@VM.MARIST.EDU
Subject: Re: [LINUX-390] VSwitch and IPv6

On Thursday, 09/06/2007 at 10:08 EDT, Robert J Brenneman [EMAIL PROTECTED]
wrote:
 Yep - you need Layer2 - Setup the vswitch like Alan mentioned. BUT:
 the
osa
 port can **not** support layer2  layer3 at the same time.

To the best of my knowledge, all L2-capable OSAs support mixed L2 and L3.
HOWEVER, only z9 with recent microcode allows L2 and L3 to crosstalk.

Alan Altmark
z/VM Development
IBM Endicott

--
For LINUX-390 subscribe / signoff / archive access instructions, send email
to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


smime.p7s
Description: S/MIME cryptographic signature


Re: I am missing something basic with bash scripting.

2007-09-06 Thread John Summerfield

David Boyes wrote:

On 9/6/2007 4:31 PM, Edmund R. MacKenty wrote:

Note that I'm using $(...) instead of backticks.  Backticks are

evil!

But I'm curious: why are backticks evil? (I didn't know about the
$(command) trick; I've been using backticks for a long time. I learn
something new every day!)


Some uppity young whippersnappers think the $() syntax is easier to
understand and convey to newbies, and are less subject to bonehead
editors replacing them with normal single quotes.


Settle down there, boy!

--

Cheers
John aka Santa

-- spambait
[EMAIL PROTECTED]  [EMAIL PROTECTED]

Please do not reply off-list

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: VSwitch and IPv6

2007-09-06 Thread Alan Altmark
On Thursday, 09/06/2007 at 10:08 EDT, Robert J Brenneman
[EMAIL PROTECTED] wrote:
 Yep - you need Layer2 - Setup the vswitch like Alan mentioned. BUT: the
osa
 port can **not** support layer2  layer3 at the same time.

To the best of my knowledge, all L2-capable OSAs support mixed L2 and L3.
HOWEVER, only z9 with recent microcode allows L2 and L3 to crosstalk.

Alan Altmark
z/VM Development
IBM Endicott

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390


Re: I am missing something basic with bash scripting.

2007-09-06 Thread Larry Ploetz

You could do something else entirely, like:

larry$ a=a
larry$ echo $list
a|b|c
larry$ [[ $list =~ $a ]]  echo hi || echo ho
hi
larry$ a=d
larry$ [[ $list =~ $a ]]  echo hi || echo ho
ho

or

[[ $(ls /clamscan/servers) =~ $target_system ]]  parm_1=valid

(assuming no system name is a subset of another system name. Otherwise:

[[ $(ls /clamscan/servers) =~ 
$target_system
 ]]  parm_1=valid

to ensure $target_system matches exactly and all of one file name in
/clamscan/servers, but the $target_system token has to be in the first
column.

or, of course, you could go the direct route:

[[ -f /clamscan/servers/$target_system ]]  parm_1=valid

James Melin wrote:

I am trying to get away from hard coded server names in a script using case for 
valid name check

This works but is not good because as soon as you add a new server to the NFS 
mountpoint list the script this is from has to be changed.

case $target_system in
  abinodji | calhoun | itasca | nokomis | pepin | phalen | vadnais | bemidji | millpond | 
mudlake | terrapin | hadley | hyland ) parm_1=valid;;
esac


So I tried several variants of this:

space= 
delim= | 
raw_list=`ls /clamscan/servers` #read list of mountpoints
cooked_list=$(echo $raw_list | sed -e s:$space:$delim:g) #replace space with 
case-happy delimiters
echo Raw list = $raw_list
echo cooked list = $cooked_list
case $target_system in
  $cooked_list ) parm_1=valid ;;
esac

But even though the display of 'cooked_list' seems to be what I want it to be, 
this never returns a match.

Anyone see where I missed the turnip truck on this?

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390




--
Carnegie Institution - At the Frontiers of Science



Larry Ploetz
Systems Administrator
Carnegie Institution of Washington
Department of Plant Biology, TAIR
650 325 1521 x 296 [EMAIL PROTECTED]

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390