Mailinglist Archive: opensuse-commit (1206 mails)
| < Previous | Next > |
commit mkinitrd
- From: root@xxxxxxx (h_root)
- Date: Sun, 21 May 2006 02:10:54 +0200 (CEST)
- Message-id: <20060521001054.D8D238EFB7@xxxxxxxxxxxxxxx>
Hello community,
here is the log from the commit of package mkinitrd
checked in at Sun May 21 02:10:54 CEST 2006.
--------
--- mkinitrd/mkinitrd.changes 2006-05-18 17:00:14.000000000 +0200
+++ mkinitrd/mkinitrd.changes 2006-05-19 17:08:48.000000000 +0200
@@ -1,0 +2,6 @@
+Fri May 19 17:04:38 CEST 2006 - hare@xxxxxxx
+
+- Configure network interfaces automatically if
+ root device is an iSCSI device (#176804)
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mkinitrd.spec ++++++
--- /var/tmp/diff_new_pack.EI2mCm/_old 2006-05-21 02:09:35.000000000 +0200
+++ /var/tmp/diff_new_pack.EI2mCm/_new 2006-05-21 02:09:35.000000000 +0200
@@ -18,7 +18,7 @@
# bootsplash required only if creating splash initrd's.
Autoreqprov: on
Version: 1.2
-Release: 107
+Release: 108
Summary: Creates an Initial RAM Disk Image for Preloading Modules
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: mkinitrd
@@ -85,6 +85,9 @@
%doc %{_mandir}/man8/mkinitrd.8.gz
%changelog -n mkinitrd
+* Fri May 19 2006 - hare@xxxxxxx
+- Configure network interfaces automatically if
+ root device is an iSCSI device (#176804)
* Thu May 18 2006 - hare@xxxxxxx
- Configure S/390 CTC devices properly.
- Start iSCSI connections properly (#176804)
++++++ mkinitrd ++++++
--- mkinitrd/mkinitrd 2006-05-18 17:00:12.000000000 +0200
+++ mkinitrd/mkinitrd 2006-05-19 17:08:43.000000000 +0200
@@ -23,7 +23,7 @@
# This file is kept in the following CVS repository:
#
# $Source: /suse/yast2/cvsroot/mkinitrd/mkinitrd,v $
-# $Revision: 1.297 $
+# $Revision: 1.298 $
usage() {
cat<<EOF
@@ -903,6 +903,26 @@
cd -P iscsi_session:session*
echo $(basename $PWD)
fi
+
+}
+
+get_default_interface() {
+ local ifname
+
+ # Determine the default network interface
+ for cfg in /etc/sysconfig/network/ifcfg-*; do
+ if [ $(basename $cfg) = "ifcfg-lo" ] ; then
+ continue;
+ fi
+ eval $(grep STARTMODE $cfg)
+ if [ "$STARTMODE" = "nfsroot" ]; then
+ cfgname=$(basename $cfg)
+ ifname=$(getcfg-interface ${cfg#*/ifcfg-})
+ eval $(grep BOOTPROTO $cfg)
+ break;
+ fi
+ done
+ echo $ifname/$BOOTPROTO
}
###################################################################
@@ -3054,6 +3074,16 @@
if [ -n "$iscsi_root" ] ; then
add_module scsi_transport_iscsi
add_module iscsi_tcp
+ if [ -z "$interface" ] ; then
+ ifspec=$(get_default_interface)
+ interface=${ifspec%%/*}
+ bootproto=${ifspec##*/}
+ if [ "$bootproto" = "dhcp" ] ; then
+ use_dhcp=1
+ else
+ use_ipconfig=1
+ fi
+ fi
fi
if [ -n "$interface" ] ; then
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
| < Previous | Next > |