home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2007 January, February, March & April
/
Chip-Cover-CD-2007-02.iso
/
boot
/
i386
/
rescue
/
etc
/
sysconfig
/
hardware
/
scripts
/
hwup-iucv
< prev
next >
Wrap
Text File
|
2006-11-29
|
1KB
|
51 lines
#!/bin/bash
#
# Configures a IUCV interface.
# $Id: hwup-iucv 1416 2006-02-17 13:44:36Z hare $
#
SCRIPTNAME=${0##*/}
HWDESC=$1
# Read in common functions
. ./scripts/functions
test -r ./config && . ./config
if test -z "$SYSFS"; then
message sysfs not mounted, aborting.
exit 1
fi
# Check whether the netiucv module is loaded
_iucv_dir=${SYSFS}/bus/iucv/drivers/netiucv
if [ ! -d "$_iucv_dir" ] ; then
# Check for older kernels
_iucv_dir=${SYSFS}/bus/iucv/drivers/NETIUCV
if [ ! -d "$_iucv_dir" ]; then
message "IUCV device not initialized !"
exit 1
fi
fi
# Check whether this link is already established
for _dev in ${SYSFS}/bus/iucv/devices/*; do
if [ -d "$_dev" ] ; then
read _link < $_dev/user
if test "$_link" = "$HWD_ID" ; then
message "IUCV device (link partner $HWD_ID) already established!"
HWD_ID=
break
fi
fi
done
if test -n "$HWD_ID" ; then
echo "$HWD_ID" > $_iucv_dir/connection
message "IUCV device (link partner $HWD_ID) configured"
fi
# EOF