[Fai-commit] r5342 - people/michael/experimental/patches

Michael Tautschnig mt at alioth.debian.org
Thu Apr 16 15:54:00 UTC 2009


Author: mt
Date: 2009-04-16 15:53:59 +0000 (Thu, 16 Apr 2009)
New Revision: 5342

Added:
   people/michael/experimental/patches/bugfix-524347
Removed:
   people/michael/experimental/patches/bugfix-521027
Modified:
   people/michael/experimental/patches/series
Log:
renamed patch for new (cloned) bug id


Deleted: people/michael/experimental/patches/bugfix-521027
===================================================================
--- people/michael/experimental/patches/bugfix-521027	2009-04-16 15:52:01 UTC (rev 5341)
+++ people/michael/experimental/patches/bugfix-521027	2009-04-16 15:53:59 UTC (rev 5342)
@@ -1,132 +0,0 @@
-2009-03-21  Luk Claes  <luk.claes at ugent.be>
-
-	* debian/control: Depends: iproute for fai-client, fai-server.
-	* fai-setup, make-fai-nfsroot: Replaced all calls to ifconfig by proper ip +
-		shell magic calls (closes: #521027).
-	* subroutine-linux, get-boot-info, task_sysinfo: Likewise.
-	* simple example: Likewise.
-Index: trunk/bin/fai-setup
-===================================================================
---- trunk.orig/bin/fai-setup
-+++ trunk/bin/fai-setup	
-@@ -115,7 +115,7 @@
- 	    [ -f /etc/ssh/ssh_host_dsa_key.pub ] && DSASERVER=$(sed -e "s/= .*$/=/" /etc/ssh/ssh_host_dsa_key.pub)
- 	    [ -f /etc/ssh/ssh_host_rsa_key.pub ] && RSASERVER=$(sed -e "s/= .*$/=/" /etc/ssh/ssh_host_rsa_key.pub )
- 	    # determine all IP addresses, and their host names
--	    ips=$(LC_ALL=C ifconfig| perl -ne '/addr:([\d.]+)/ && print"$1\n"'|grep -v 127.0.0.1)
-+	    ips=$(ip addr | grep -w inet | cut -d t -f 2 | cut -d ' ' -f 2 | grep -v 127.0.0.1)
- 	    for ip in $ips; do
- 		hname=$(getent hosts $ip| tr -s ' ' ',')
- 		[ -z "$hname" ] && hname=$ip
-@@ -176,13 +176,12 @@
-     test -f /etc/init.d/nfs-kernel-server && nfsserver=nfs-kernel-server
-     test -f /etc/init.d/nfs-user-server && nfsserver=nfs-user-server
- 
--    addr=$(LC_ALL=C ifconfig $SERVERINTERFACE | grep -v 127.0.0.1 | perl -ne '/addr:([\d.]+)/ && print"$1\n"'|head -1)
--    mask=$(LC_ALL=C ifconfig $SERVERINTERFACE | grep -v 127.0.0.1 | perl -ne '/Mask:([\d.]+)/ && print"$1\n"'|head -1)
-+    addr=$(ip addr show dev $SERVERINTERFACE | grep -w inet | cut -d t -f 2 | cut -d ' ' -f 2 | cut -d / -f 1 | grep -v 127.0.0.1 | head -1)
- 
-     if expr match "$FAI_CONFIG_SRC" 'nfs:\/\/' > /dev/null; then
--        add_export_line $FAI_CONFIGDIR  "$addr/$mask(async,ro,no_subtree_check)"
-+        add_export_line $FAI_CONFIGDIR  "$addr(async,ro,no_subtree_check)"
-     fi
--    add_export_line $NFSROOT  "$addr/$mask(async,ro,no_subtree_check,no_root_squash)"
-+    add_export_line $NFSROOT  "$addr(async,ro,no_subtree_check,no_root_squash)"
-     if [ -z "$nfsserver" ]; then
- 	echo "Could not find the type of your nfs server. Maybe"
- 	echo "no nfs server is installed. I can't restart it."
-Index: trunk/bin/make-fai-nfsroot
-===================================================================
---- trunk.orig/bin/make-fai-nfsroot
-+++ trunk/bin/make-fai-nfsroot	
-@@ -248,7 +248,7 @@
- # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- add_all_host_entries() {
- 
--    local ips=$(ifconfig | grep -w inet | cut -d : -f 2 | cut -d ' ' -f 1 | grep -v 127.0.0.1)
-+    local ips=$(ip addr | grep -w inet | cut -d t -f 2 | cut -d ' ' -f 2 | cut -d / -f 1 | grep -v 127.0.0.1)
-     for eth in $ips; do
- 	getent hosts $eth >> etc/hosts || true
-     done
-Index: trunk/debian/control
-===================================================================
---- trunk.orig/debian/control
-+++ trunk/debian/control	
-@@ -13,7 +13,7 @@
- Package: fai-client
- Architecture: all
- Section: admin
--Depends: perl, file, libapt-pkg-perl, libparse-recdescent-perl, liblinux-lvm-perl, net-tools
-+Depends: perl, file, libapt-pkg-perl, libparse-recdescent-perl, liblinux-lvm-perl, iproute
- Recommends: debconf-utils, cfengine2
- Suggests: ntfsprogs, dmsetup, cryptsetup, logtail
- Conflicts: fai, fai-kernels
-@@ -46,7 +46,7 @@
- Architecture: all
- Section: admin
- Depends: fai-client, debootstrap
--Recommends: nfs-kernel-server, dhcp3-server | bootp, tftpd-hpa | tftpd, openssh-server, openssh-client, syslinux-common, openbsd-inetd | inet-superserver
-+Recommends: nfs-kernel-server, dhcp3-server | bootp, tftpd-hpa | tftpd, openssh-server, openssh-client, syslinux-common, openbsd-inetd | inet-superserver, iproute
- Suggests: debmirror, apt-move, genisoimage, grub, aptitude, perl-tk, libproc-daemon-perl
- Conflicts: fai
- Replaces: fai
-Index: trunk/examples/simple/files/etc/rc2.d/S99fai-setup/FAISERVER
-===================================================================
---- trunk.orig/examples/simple/files/etc/rc2.d/S99fai-setup/FAISERVER
-+++ trunk/examples/simple/files/etc/rc2.d/S99fai-setup/FAISERVER	
-@@ -13,7 +13,7 @@
- 
- # setup network
- dhclient eth0  # connection to the outside world (hopefully)
--ifconfig eth0:1 192.168.1.250 # (fixed address of faiserver)
-+ip addr add 192.168.1.250 dev eth0 # (fixed address of faiserver)
- /etc/init.d/nscd restart
- /etc/init.d/apache2 restart
- /etc/init.d/apt-proxy restart
-Index: trunk/lib/get-boot-info
-===================================================================
---- trunk.orig/lib/get-boot-info
-+++ trunk/lib/get-boot-info	
-@@ -41,14 +41,14 @@
- netdevice_info() {
- 
-     # devices that are running
--    netdevices_up=$(ifconfig | perl -anF'\s+' -e 'print "$F[0]\n" if $F[0];' | grep -v "^lo" | sort | uniq)
-+    netdevices_up=$(ip link | grep "^[1-9$]" | cut -d : -f 2 | cut -d ' ' -f 2 | grep -v "^lo" | sort | uniq)
-     # netdevices is the list of ethernet devices which will be used for bootpc (maybe dhcp)
-     # if not defined, use boot messages to determine network devices
-     [ -n "$netdevices" ] || netdevices=$netdevices_up
- 
-     # some network driver do not echo eth0,..; they are not detected
-     netdevices_all=$(dmesg| perl -ne 'print $&,"\n" if m/\beth[0-9]\b/')
--    tmp=$(ifconfig -a | awk '/^eth/ { print $1 }')
-+    tmp=$(ip link | grep "^[1-9]" | cut -d : -f 2 | cut -d ' ' -f 2 | grep "^eth")
-     netdevices_all="$netdevices_all $tmp"
-     netdevices_all=$(for dev in $netdevices_all; do echo $dev; done| sort | uniq)
- 
-Index: trunk/lib/subroutines-linux
-===================================================================
---- trunk.orig/lib/subroutines-linux
-+++ trunk/lib/subroutines-linux	
-@@ -270,7 +270,7 @@
- 
-     if [ $do_init_tasks -eq 1 ] ; then
- 	# show some local information
--	ifconfig; df
-+	ip addr; df
- 	# umount swap space
- 	swapoff -a
-     fi
-Index: trunk/lib/task_sysinfo
-===================================================================
---- trunk.orig/lib/task_sysinfo
-+++ trunk/lib/task_sysinfo	
-@@ -26,7 +26,7 @@
- lsusb
- echo "Ethernet cards found: $netdevices_all"
- echo "Ethernet cards running: $netdevices_up"
--ifconfig -a
-+ip addr
- 
- [ -x "$(which sysinfo)" ] && sysinfo -class device -level all
- 

Copied: people/michael/experimental/patches/bugfix-524347 (from rev 5341, people/michael/experimental/patches/bugfix-521027)
===================================================================
--- people/michael/experimental/patches/bugfix-524347	                        (rev 0)
+++ people/michael/experimental/patches/bugfix-524347	2009-04-16 15:53:59 UTC (rev 5342)
@@ -0,0 +1,132 @@
+2009-03-21  Luk Claes  <luk.claes at ugent.be>
+
+	* debian/control: Depends: iproute for fai-client, fai-server.
+	* fai-setup, make-fai-nfsroot: Replaced all calls to ifconfig by proper ip +
+		shell magic calls (closes: #524347).
+	* subroutine-linux, get-boot-info, task_sysinfo: Likewise.
+	* simple example: Likewise.
+Index: trunk/bin/fai-setup
+===================================================================
+--- trunk.orig/bin/fai-setup
++++ trunk/bin/fai-setup	
+@@ -115,7 +115,7 @@
+ 	    [ -f /etc/ssh/ssh_host_dsa_key.pub ] && DSASERVER=$(sed -e "s/= .*$/=/" /etc/ssh/ssh_host_dsa_key.pub)
+ 	    [ -f /etc/ssh/ssh_host_rsa_key.pub ] && RSASERVER=$(sed -e "s/= .*$/=/" /etc/ssh/ssh_host_rsa_key.pub )
+ 	    # determine all IP addresses, and their host names
+-	    ips=$(LC_ALL=C ifconfig| perl -ne '/addr:([\d.]+)/ && print"$1\n"'|grep -v 127.0.0.1)
++	    ips=$(ip addr | grep -w inet | cut -d t -f 2 | cut -d ' ' -f 2 | grep -v 127.0.0.1)
+ 	    for ip in $ips; do
+ 		hname=$(getent hosts $ip| tr -s ' ' ',')
+ 		[ -z "$hname" ] && hname=$ip
+@@ -176,13 +176,12 @@
+     test -f /etc/init.d/nfs-kernel-server && nfsserver=nfs-kernel-server
+     test -f /etc/init.d/nfs-user-server && nfsserver=nfs-user-server
+ 
+-    addr=$(LC_ALL=C ifconfig $SERVERINTERFACE | grep -v 127.0.0.1 | perl -ne '/addr:([\d.]+)/ && print"$1\n"'|head -1)
+-    mask=$(LC_ALL=C ifconfig $SERVERINTERFACE | grep -v 127.0.0.1 | perl -ne '/Mask:([\d.]+)/ && print"$1\n"'|head -1)
++    addr=$(ip addr show dev $SERVERINTERFACE | grep -w inet | cut -d t -f 2 | cut -d ' ' -f 2 | cut -d / -f 1 | grep -v 127.0.0.1 | head -1)
+ 
+     if expr match "$FAI_CONFIG_SRC" 'nfs:\/\/' > /dev/null; then
+-        add_export_line $FAI_CONFIGDIR  "$addr/$mask(async,ro,no_subtree_check)"
++        add_export_line $FAI_CONFIGDIR  "$addr(async,ro,no_subtree_check)"
+     fi
+-    add_export_line $NFSROOT  "$addr/$mask(async,ro,no_subtree_check,no_root_squash)"
++    add_export_line $NFSROOT  "$addr(async,ro,no_subtree_check,no_root_squash)"
+     if [ -z "$nfsserver" ]; then
+ 	echo "Could not find the type of your nfs server. Maybe"
+ 	echo "no nfs server is installed. I can't restart it."
+Index: trunk/bin/make-fai-nfsroot
+===================================================================
+--- trunk.orig/bin/make-fai-nfsroot
++++ trunk/bin/make-fai-nfsroot	
+@@ -248,7 +248,7 @@
+ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ add_all_host_entries() {
+ 
+-    local ips=$(ifconfig | grep -w inet | cut -d : -f 2 | cut -d ' ' -f 1 | grep -v 127.0.0.1)
++    local ips=$(ip addr | grep -w inet | cut -d t -f 2 | cut -d ' ' -f 2 | cut -d / -f 1 | grep -v 127.0.0.1)
+     for eth in $ips; do
+ 	getent hosts $eth >> etc/hosts || true
+     done
+Index: trunk/debian/control
+===================================================================
+--- trunk.orig/debian/control
++++ trunk/debian/control	
+@@ -13,7 +13,7 @@
+ Package: fai-client
+ Architecture: all
+ Section: admin
+-Depends: perl, file, libapt-pkg-perl, libparse-recdescent-perl, liblinux-lvm-perl, net-tools
++Depends: perl, file, libapt-pkg-perl, libparse-recdescent-perl, liblinux-lvm-perl, iproute
+ Recommends: debconf-utils, cfengine2
+ Suggests: ntfsprogs, dmsetup, cryptsetup, logtail
+ Conflicts: fai, fai-kernels
+@@ -46,7 +46,7 @@
+ Architecture: all
+ Section: admin
+ Depends: fai-client, debootstrap
+-Recommends: nfs-kernel-server, dhcp3-server | bootp, tftpd-hpa | tftpd, openssh-server, openssh-client, syslinux-common, openbsd-inetd | inet-superserver
++Recommends: nfs-kernel-server, dhcp3-server | bootp, tftpd-hpa | tftpd, openssh-server, openssh-client, syslinux-common, openbsd-inetd | inet-superserver, iproute
+ Suggests: debmirror, apt-move, genisoimage, grub, aptitude, perl-tk, libproc-daemon-perl
+ Conflicts: fai
+ Replaces: fai
+Index: trunk/examples/simple/files/etc/rc2.d/S99fai-setup/FAISERVER
+===================================================================
+--- trunk.orig/examples/simple/files/etc/rc2.d/S99fai-setup/FAISERVER
++++ trunk/examples/simple/files/etc/rc2.d/S99fai-setup/FAISERVER	
+@@ -13,7 +13,7 @@
+ 
+ # setup network
+ dhclient eth0  # connection to the outside world (hopefully)
+-ifconfig eth0:1 192.168.1.250 # (fixed address of faiserver)
++ip addr add 192.168.1.250 dev eth0 # (fixed address of faiserver)
+ /etc/init.d/nscd restart
+ /etc/init.d/apache2 restart
+ /etc/init.d/apt-proxy restart
+Index: trunk/lib/get-boot-info
+===================================================================
+--- trunk.orig/lib/get-boot-info
++++ trunk/lib/get-boot-info	
+@@ -41,14 +41,14 @@
+ netdevice_info() {
+ 
+     # devices that are running
+-    netdevices_up=$(ifconfig | perl -anF'\s+' -e 'print "$F[0]\n" if $F[0];' | grep -v "^lo" | sort | uniq)
++    netdevices_up=$(ip link | grep "^[1-9$]" | cut -d : -f 2 | cut -d ' ' -f 2 | grep -v "^lo" | sort | uniq)
+     # netdevices is the list of ethernet devices which will be used for bootpc (maybe dhcp)
+     # if not defined, use boot messages to determine network devices
+     [ -n "$netdevices" ] || netdevices=$netdevices_up
+ 
+     # some network driver do not echo eth0,..; they are not detected
+     netdevices_all=$(dmesg| perl -ne 'print $&,"\n" if m/\beth[0-9]\b/')
+-    tmp=$(ifconfig -a | awk '/^eth/ { print $1 }')
++    tmp=$(ip link | grep "^[1-9]" | cut -d : -f 2 | cut -d ' ' -f 2 | grep "^eth")
+     netdevices_all="$netdevices_all $tmp"
+     netdevices_all=$(for dev in $netdevices_all; do echo $dev; done| sort | uniq)
+ 
+Index: trunk/lib/subroutines-linux
+===================================================================
+--- trunk.orig/lib/subroutines-linux
++++ trunk/lib/subroutines-linux	
+@@ -270,7 +270,7 @@
+ 
+     if [ $do_init_tasks -eq 1 ] ; then
+ 	# show some local information
+-	ifconfig; df
++	ip addr; df
+ 	# umount swap space
+ 	swapoff -a
+     fi
+Index: trunk/lib/task_sysinfo
+===================================================================
+--- trunk.orig/lib/task_sysinfo
++++ trunk/lib/task_sysinfo	
+@@ -26,7 +26,7 @@
+ lsusb
+ echo "Ethernet cards found: $netdevices_all"
+ echo "Ethernet cards running: $netdevices_up"
+-ifconfig -a
++ip addr
+ 
+ [ -x "$(which sysinfo)" ] && sysinfo -class device -level all
+ 

Modified: people/michael/experimental/patches/series
===================================================================
--- people/michael/experimental/patches/series	2009-04-16 15:52:01 UTC (rev 5341)
+++ people/michael/experimental/patches/series	2009-04-16 15:53:59 UTC (rev 5342)
@@ -11,7 +11,7 @@
 bugfix-479537
 setup-storage_full-crypto-support
 bugfix-520554
-bugfix-521027
+bugfix-524347
 setup-storage_missing-raid-devs
 bugfix-504813
 bugfix-506463




More information about the Fai-commit mailing list