Hello community,
here is the log from the commit of package mkinitrd
checked in at Thu May 18 19:02:25 CEST 2006.
--------
--- mkinitrd/mkinitrd.changes 2006-05-08 02:30:52.000000000 +0200
+++ mkinitrd/mkinitrd.changes 2006-05-18 17:00:14.000000000 +0200
@@ -1,0 +2,17 @@
+Thu May 18 16:50:30 CEST 2006 - hare@suse.de
+
+- Configure S/390 CTC devices properly.
+- Start iSCSI connections properly (#176804)
+
+-------------------------------------------------------------------
+Tue May 16 11:55:25 CEST 2006 - hare@suse.de
+
+- Fix iSCSI root (#175191)
+- Fix feature list expansion (#175602)
+
+-------------------------------------------------------------------
+Mon May 15 10:24:23 CEST 2006 - hare@suse.de
+
+- Fix improper condition in mkinitrd (#94586).
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mkinitrd.spec ++++++
--- /var/tmp/diff_new_pack.ySlmVH/_old 2006-05-18 19:01:58.000000000 +0200
+++ /var/tmp/diff_new_pack.ySlmVH/_new 2006-05-18 19:01:58.000000000 +0200
@@ -18,7 +18,7 @@
# bootsplash required only if creating splash initrd's.
Autoreqprov: on
Version: 1.2
-Release: 106
+Release: 107
Summary: Creates an Initial RAM Disk Image for Preloading Modules
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: mkinitrd
@@ -85,6 +85,14 @@
%doc %{_mandir}/man8/mkinitrd.8.gz
%changelog -n mkinitrd
+* Thu May 18 2006 - hare@suse.de
+- Configure S/390 CTC devices properly.
+- Start iSCSI connections properly (#176804)
+* Tue May 16 2006 - hare@suse.de
+- Fix iSCSI root (#175191)
+- Fix feature list expansion (#175602)
+* Mon May 15 2006 - hare@suse.de
+- Fix improper condition in mkinitrd (#94586).
* Mon May 08 2006 - garloff@suse.de
- Add option u: also to the getopts call (#166921).
* Sun May 07 2006 - olh@suse.de
++++++ ipconfig.sh ++++++
--- mkinitrd/ipconfig.sh 2006-02-16 12:59:20.000000000 +0100
+++ mkinitrd/ipconfig.sh 2006-05-18 17:00:18.000000000 +0200
@@ -12,12 +12,12 @@
# Analyze each block
prefix=0
- while (( $1 == 255 )); do
+ while [ "$1" ] && (( $1 == 255 )); do
prefix=$(($prefix + 8))
shift
done
# Bit-shift first non-zero block
- if (( $1 > 0 )); then
+ if [ "$1" ] && (( $1 > 0 )); then
mask=$1
prefix=$(($prefix + 8))
while (( ($mask & 0x1) == 0 )) ; do
@@ -35,7 +35,7 @@
client=$1
shift
if [ "$1" != "_" ] ; then
- server=$1
+ peer=$1
shift
fi
if [ "$1" != "_" ] ; then
@@ -76,7 +76,11 @@
fi
# Configure the interface
-/sbin/ip addr add ${client}/${prefix} dev $dev
+if [ "$peer" ] ; then
+ /sbin/ip addr add ${client} peer ${peer}/$prefix dev $dev
+else
+ /sbin/ip addr add ${client}/${prefix} dev $dev
+fi
/sbin/ip link set $dev up
if [ "$gateway" ]; then
++++++ mkinitrd ++++++
--- mkinitrd/mkinitrd 2006-05-08 02:30:52.000000000 +0200
+++ mkinitrd/mkinitrd 2006-05-18 17:00:12.000000000 +0200
@@ -23,7 +23,7 @@
# This file is kept in the following CVS repository:
#
# $Source: /suse/yast2/cvsroot/mkinitrd/mkinitrd,v $
-# $Revision: 1.293 $
+# $Revision: 1.297 $
usage() {
cat<= 8 )) ; do
+ while (( $prefix > 8 )) ; do
if (( $num > 0 )) ; then
netmask="${netmask}.255"
else
@@ -863,6 +863,11 @@
shift
ipaddr=${1%%/*}
+ shift
+ if [ "$1" == "peer" ] ; then
+ shift
+ peeraddr=${1%%/*}
+ fi
prefix=${1##*/}
netmask=$(calc_netmask $prefix)
bcast=$3
@@ -873,7 +878,7 @@
gwaddr=$3
fi
hostname=$(hostname)
- echo "$ipaddr:$srvaddr:$gwaddr:$netmask:$hostname:$iface:none"
+ echo "$ipaddr:$peeraddr:$gwaddr:$netmask:$hostname:$iface:none"
}
check_iscsi_root() {
@@ -894,8 +899,9 @@
cd -P device
cd ../..
- if [ -d session* ]; then
- echo session*
+ if [ -d iscsi_session:session* ]; then
+ cd -P iscsi_session:session*
+ echo $(basename $PWD)
fi
}
@@ -1147,6 +1153,26 @@
fi
}
+s390_get_ctc_ccwdevs()
+{
+ local interface=$1
+
+ if [ ! -d /sys/class/net/$interface/device ] ; then
+ error 1 "No device link for interface $interface"
+ fi
+ pushd /sys/class/net/$interface/device > /dev/null 2>&1
+ cd -P cdev0
+ cdev0=$(basename $PWD)
+ popd > /dev/null 2>&1
+
+ pushd /sys/class/net/$interface/device > /dev/null 2>&1
+ cd -P cdev1
+ cdev1=$(basename $PWD)
+ popd > /dev/null 2>&1
+
+ echo "$cdev0,$cdev1"
+}
+
###################################################################
#
# Create the initrd image $2 for kernel $1 (both are absolute path names).
@@ -1226,7 +1252,7 @@
# Enable user-selected features
if [ "$feature_list" ] ; then
- for f in "$feature_list" ; do
+ for f in $feature_list ; do
case $f in
iscsi)
add_module iscsi_tcp
@@ -1280,6 +1306,7 @@
cp_bin /sbin/iscsiadm $tmp_mnt/sbin/iscsiadm
cat /etc/initiatorname.iscsi > $tmp_mnt/etc/initiatorname.iscsi
mkdir -p $tmp_mnt/var/lib/open-iscsi
+ mkdir -p $tmp_mnt/var/run
cp /var/lib/open-iscsi/discovery.db $tmp_mnt/var/lib/open-iscsi
cp /var/lib/open-iscsi/node.db $tmp_mnt/var/lib/open-iscsi
cp_bin /bin/usleep $tmp_mnt/bin/usleep
@@ -2152,6 +2179,33 @@
EOF
fi
+ if [ -n "$interface" ] ; then
+ case $interface in
+ ctc*)
+ ccwdevs=$(s390_get_ctc_ccwdevs $interface)
+ cat_linuxrc <<-EOF
+ |# configure $interface
+ |if [ -d /sys/bus/ccwgroup/drivers/ctc ]; then
+ | echo "$ccwdevs" > /sys/bus/ccwgroup/drivers/ctc/group
+ | # Wait for the device to appear
+ | i=100
+ | while [ "\$i" -gt 0 ]; do
+ | [ -d /sys/bus/ccwgroup/devices/${ccwdevs%%,*} ] && break
+ | i=\$(( \$i - 1 ))
+ | done
+ | if [ "\$i" -le 0 ] ; then
+ | echo "Interface $interface could not be setup, exiting to /bin/sh"
+ | cd /
+ | PATH=$PATH PS1='$ ' /bin/sh -i
+ | else
+ | echo 1 > /sys/bus/ccwgroup/devices/${ccwdevs%%,*}/online
+ | fi
+ |fi
+ EOF
+ ;;
+ esac
+ fi
+
if [ -n "$use_ipconfig" ]; then
ipinterface=$(get_ip_config $interface)
cat_linuxrc <<-EOF
@@ -2173,7 +2227,9 @@
fi
if [ -n "$iscsi_root" ] ; then
- iscsi_sid=$(/sbin/iscsiadm -m node | grep `cat /sys/class/iscsi_session/${iscsi_root}/targetname` | sed 's@\[\(.*\)\] .*@\1@g')
+ iscsi_tgtname=$(cat /sys/class/iscsi_session/${iscsi_root}/targetname)
+ iscsi_tgtaddr=$(cat /sys/class/iscsi_connection/connection${iscsi_root#session}:0/address)
+ iscsi_sid=$(/sbin/iscsiadm -m node | grep "$iscsi_tgtname" | grep "$iscsi_tgtaddr" | sed 's@\[\(.*\)\] .*@\1@g')
cat_linuxrc <<-EOF
|iscsi_login_root_node()
|{
@@ -2181,9 +2237,16 @@
| local iscsi_sid
|
| if [ -n "\$iscsitarget" ] ; then
- | iscsi_sid=$(/sbin/iscsiadm -m node | grep \$iscsitarget | sed 's@\[\(.*\)\] .*@\1@g')
+ | if [ -n "\$iscsiserver" ] ; then
+ | iscsi_sid=\$(/sbin/iscsiadm -m node | grep \$iscsitarget | grep \$iscsiserver | sed 's@\[\(.*\)\] .*@\1@g')
+ | else
+ | iscsi_sid=\$(/sbin/iscsiadm -m node | grep \$iscsitarget | sed 's@\[\(.*\)\] .*@\1@g')
+ | else
+ | if [ -n "\$iscsiserver" ] ; then
+ | iscsi_sid=\$(/sbin/iscsiadm -m node | grep \$iscsiserver | sed 's@\[\(.*\)\] .*@\1@g')
+ | fi
| fi
- | if [ -z "\iscsi_sid" ] ; then
+ | if [ -z "\$iscsi_sid" ] ; then
| iscsi_sid=$iscsi_sid
| fi
|
@@ -2750,8 +2813,8 @@
echo "No bootsplash for kernel flavor ${kernel_version##*-}"
else
echo -ne "Bootsplash:\t"
- if [ -n "$themes_dir" -a \
- -d "$themes_dir/$THEME" -o -L "$themes_dir/$THEME" ]; then
+ if [ -n "$themes_dir" ] && \
+ [ -d "$themes_dir/$THEME" -o -L "$themes_dir/$THEME" ]; then
for size in $splashsizes; do
bootsplash_picture="$themes_dir/$THEME/images/bootsplash-$size.jpg"
cfgname="$themes_dir/$THEME/config/bootsplash-$size.cfg"
@@ -2871,6 +2934,12 @@
error 1 "Could not expand $rootdev to real device"
fi
;;
+ /dev/disk/*)
+ realrootdev=$(/usr/bin/readlink -m $rootdev)
+ # Check for iSCSI
+ sid=$(check_iscsi_root $realrootdev)
+ iscsi_root="$sid"
+ ;;
esac
# check for journal device
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...