Mailinglist Archive: opensuse-commit (1421 mails)
| < Previous | Next > |
commit mkinitrd
- From: root@xxxxxxxxxxxxxxx (h_root)
- Date: Fri, 23 May 2008 12:44:39 +0200
- Message-id: <20080523104440.3A648678180@xxxxxxxxxxxxxxx>
Hello community,
here is the log from the commit of package mkinitrd
checked in at Fri May 23 12:44:39 CEST 2008.
--------
--- mkinitrd/mkinitrd.changes 2008-05-02 12:52:54.000000000 +0200
+++ /mounts/work_src_done/STABLE/mkinitrd/mkinitrd.changes 2008-05-23
09:05:53.000000000 +0200
@@ -1,0 +2,6 @@
+Wed May 21 14:55:47 CEST 2008 - hare@xxxxxxx
+
+- Fixup DHCP and static IP detection (bnc#390756)
+- Ignore all commandline arguments after init= (bnc#389672)
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mkinitrd.spec ++++++
--- /var/tmp/diff_new_pack.fa8695/_old 2008-05-23 12:44:21.000000000 +0200
+++ /var/tmp/diff_new_pack.fa8695/_new 2008-05-23 12:44:21.000000000 +0200
@@ -18,7 +18,7 @@
Requires: coreutils modutils util-linux grep gzip sed cpio udev sysvinit
file perl
AutoReqProv: on
Version: 2.2
-Release: 11
+Release: 17
Summary: Creates an Initial RAM Disk Image for Preloading Modules
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: mkinitrd.tgz
@@ -100,6 +100,9 @@
%doc %{_mandir}/man8/mkinitrd.8.gz
%changelog
+* Wed May 21 2008 hare@xxxxxxx
+- Fixup DHCP and static IP detection (bnc#390756)
+- Ignore all commandline arguments after init= (bnc#389672)
* Fri May 02 2008 hare@xxxxxxx
- Fixup boot from multipath (bnc#385240)
- Add 'mkinitrd.config' file to the initrd (bnc#380687)
++++++ mkinitrd.tgz ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/mkinitrd-2.2/mkinitrd.changes
new/mkinitrd-2.2/mkinitrd.changes
--- old/mkinitrd-2.2/mkinitrd.changes 2008-05-02 12:51:48.000000000 +0200
+++ new/mkinitrd-2.2/mkinitrd.changes 2008-05-23 09:05:38.000000000 +0200
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Wed May 21 14:55:47 CEST 2008 - hare@xxxxxxx
+
+- Fixup DHCP and static IP detection (bnc#390756)
+- Ignore all commandline arguments after init= (bnc#389672)
+
+-------------------------------------------------------------------
Fri May 2 09:57:57 CEST 2008 - hare@xxxxxxx
- Fixup boot from multipath (bnc#385240)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/mkinitrd-2.2/scripts/boot-network.sh
new/mkinitrd-2.2/scripts/boot-network.sh
--- old/mkinitrd-2.2/scripts/boot-network.sh 2008-05-02 12:51:48.000000000
+0200
+++ new/mkinitrd-2.2/scripts/boot-network.sh 2008-05-23 09:05:38.000000000
+0200
@@ -38,11 +38,9 @@
if [ "$ip" -a ! "$(echo $ip | sed '/:/P;d')" ]; then
echo "[NETWORK] using dhcp on $interface based on ip=$ip"
- use_dhcp=1
- use_ipconfig=
+ nettype=dhcp
elif [ "${ip##*:}" = dhcp ]; then
- use_dhcp=1
- use_ipconfig=
+ nettype=dhcp
newinterface="${ip%*:dhcp}"
newinterface="${newinterface##*:}"
[ "$newinterface" != dhcp -a "$newinterface" ] &&
interface="$newinterface"
@@ -52,19 +50,18 @@
if [ "$(get_param dhcp)" -a "$(get_param dhcp)" != "off" ]; then
echo "[NETWORK] using dhcp based on dhcp=$dhcp"
interface=$(get_param dhcp)
- use_dhcp=1
- use_ipconfig=
+ nettype=dhcp
fi
-[ "$(get_param dhcp)" = "off" ] && use_dhcp=
+[ "$(get_param dhcp)" = "off" ] && nettype=static
-if [ "$ip" -a ! "$use_dhcp" ]; then
+if [ "$ip" -a "$nettype" != "dhcp" ]; then
echo "[NETWORK] using static config based on ip=$ip"
- use_ipconfig=1
+ nettype=static
fi
# dhcp based ip config
-if [ "$use_dhcp" ]; then
+if [ "$nettype" = "static" ]; then
# run dhcp
if [ "$interface" != "off" ]; then
# ifconfig lo 127.0.0.1 netmask 255.0.0.0 broadcast 127.255.255.255 up
@@ -92,7 +89,7 @@
fi
# static ip config
-elif [ -n "$use_ipconfig" ]; then
+elif [ "$nettype" = "static" ]; then
# configure interface
if [ -n "$ip" ]; then
/bin/ipconfig $ip
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/mkinitrd-2.2/scripts/boot-start.sh
new/mkinitrd-2.2/scripts/boot-start.sh
--- old/mkinitrd-2.2/scripts/boot-start.sh 2008-05-02 12:51:48.000000000
+0200
+++ new/mkinitrd-2.2/scripts/boot-start.sh 2008-05-23 09:05:38.000000000
+0200
@@ -70,6 +70,11 @@
eval cmd_$key="${value}"
eval $key="${value}" 2> /dev/null
fi
+ if [ "$key" = "init" ] ; then
+ # All values after init= are for the init process
+ # and will be ignored here
+ break;
+ fi
done
if [ "$console" ]; then
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/mkinitrd-2.2/scripts/setup-network.sh
new/mkinitrd-2.2/scripts/setup-network.sh
--- old/mkinitrd-2.2/scripts/setup-network.sh 2008-05-02 12:51:48.000000000
+0200
+++ new/mkinitrd-2.2/scripts/setup-network.sh 2008-05-23 09:05:38.000000000
+0200
@@ -110,13 +110,18 @@
}
interface=${interface#/dev/}
-[ "$param_D" ] && use_dhcp=1
-[ "$param_I" ] && use_ipconfig=1
+[ "$param_D" ] && nettype=dhcp
+[ "$param_I" ] && nettype=static
# get the default interface if requested
if [ "$interface" = "default" ]; then
- ifspec=$(get_default_interface)
- interface=${ifspec%%/*}
+ ifspec=$(get_default_interface)
+ interface=${ifspec%%/*}
+ if [ ${ifspec##*/} = "dhcp" ] ; then
+ nettype=dhcp
+ else
+ nettype=static
+ fi
fi
if [ "$create_monster_initrd" ]; then
@@ -139,46 +144,16 @@
drvlink=$(cd /sys/class/net/$interface/device; readlink driver)
fi
drvlink=${drvlink##*/}
+ # xen network driver registers as 'vif'
+ if [ "$drvlink" == "vif" ] ; then
+ drvlink=xennet
+ fi
read macaddress < /sys/class/net/$interface/address
fi
-
- # type of eth device (eth, ctc, ...)
- iftype="$(echo $interface | sed 's/^\([a-z|!]*\)[0-9]*$/\1/')"
-
- if [ ! -e "$configfile" ]; then
- # try mac based config file
- configfile="/etc/sysconfig/network/ifcfg-$iftype-id-$macaddress"
- fi
- if [ ! -e "$configfile" ]; then
- # try bus based config file
- busid=$(basename $ifpath)
-
- case "$ifpath" in
- *pci*)
- bustype=pci
- ;;
- *css*)
- bustype=ccw
- ;;
- *cu*)
- bustype=ccw
- ;;
- esac
-
configfile="/etc/sysconfig/network/ifcfg-$iftype-bus-$bustype-$busid"
- fi
- if [ ! -e "$configfile" ]; then
- # try id based config file
- configfile="/etc/sysconfig/network/ifcfg-$interface"
- fi
- [ -e "$configfile" ] && . $configfile
-
- if [ "$BOOTPROTO" = "dhcp" -a ! "$use_ipconfig" ]; then
- use_dhcp=1
- use_ipconfig=
- elif [ ! "$use_dhcp" ]; then
- use_dhcp=
- use_ipconfig=1
- fi
+fi
+
+# Get static IP configuration if requested
+if [ "$interface" -a "$nettype" = "static" ] ; then
ip=$(get_ip_config $interface)
fi
@@ -187,12 +162,9 @@
cp_bin $root_dir/lib/mkinitrd/bin/ipconfig.sh $tmp_mnt/bin/ipconfig
-[ "$use_ipconfig" ] && nettype=static
-[ "$use_dhcp" ] && nettype=dhcp
[ "$interface" ] && verbose "[NETWORK]\t$interface ($nettype)"
-save_var use_ipconfig
-save_var use_dhcp
+save_var nettype
save_var ip
save_var interface
save_var macaddress
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/mkinitrd-2.2/scripts/setup-storage.sh
new/mkinitrd-2.2/scripts/setup-storage.sh
--- old/mkinitrd-2.2/scripts/setup-storage.sh 2008-05-02 12:51:48.000000000
+0200
+++ new/mkinitrd-2.2/scripts/setup-storage.sh 2008-05-23 09:05:38.000000000
+0200
@@ -305,7 +305,6 @@
case "$rootdev" in
/dev/nfs)
rootfstype=nfs
- use_dhcp=1
;;
/dev/*)
if [ ! -e "$rootdev" ]; then
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx
| < Previous | Next > |