[Fai-commit] r6010 - branches/stable/3.4/bin

Michael Prokop mika at alioth.debian.org
Tue Aug 17 12:56:18 UTC 2010


Author: mika
Date: 2010-08-17 12:56:17 +0000 (Tue, 17 Aug 2010)
New Revision: 6010

Modified:
   branches/stable/3.4/bin/make-fai-nfsroot
Log:
fixed syntax error (found by lintian run on experimental builds)


Signed-off-by: Michael Prokop <mika at grml.org>

Modified: branches/stable/3.4/bin/make-fai-nfsroot
===================================================================
--- branches/stable/3.4/bin/make-fai-nfsroot	2010-08-17 12:56:13 UTC (rev 6009)
+++ branches/stable/3.4/bin/make-fai-nfsroot	2010-08-17 12:56:17 UTC (rev 6010)
@@ -141,6 +141,7 @@
 [ -z "$TFTPROOT" ] && badupdateto32 "\$TFTPROOT is not set. Please check your settings in $cfdir/make-fai-nfsroot.conf."
 [ -n "$KERNELPACKAGE" ] && badupdateto32 "The use of \$KERNELPACKAGE is deprecated. Please use $cfdir/NFSROOT now."
 [ ! -d "$cfdir/apt" ] && die "$cfdir/apt/ does not exists. Can't continue."
+[ -n "$FAI_BOOT" ] && die "Variable \$FAI_BOOT is not supported any more. Will only set up DHCP environment." 
 
 oldnfsroot=$NFSROOT
 NFSROOT="$NFSROOT/live/filesystem.dir"
@@ -360,7 +361,9 @@
     ln -sf /usr/share/zoneinfo/$timezone etc/localtime
     ln -sf /proc/mounts etc/mtab
     [ -f etc/init/tty1.conf ] || ln -s /usr/sbin/fai etc/init.d/rcS
-    find etc/init ! -type d | egrep -v "fai|udev|hostname|mountall|mounted" | xargs -r rm
+    if [ -d etc/init ]; then   # if upstart is available
+	find etc/init ! -type d | egrep -v "fai|udev|hostname|mountall|mounted" | xargs -r rm
+    fi
 
     # definition for loopback device
     echo "iface lo inet loopback" > etc/network/interfaces
@@ -441,7 +444,7 @@
     rm -f $NFSROOT/boot/*.bak
     mkdir -p $TFTPROOT/pxelinux.cfg
     cp -pv $NFSROOT/boot/vmlinu?-* $NFSROOT/boot/initrd.img-* $TFTPROOT
-    [ -f $pxebin ] && cp $pxebin $TFTPROOT
+    [ -f $TFTPROOT/pxelinux.0 ] || cp $pxebin $TFTPROOT
     echo "DHCP environment prepared. If you want to use it, you have to enable the dhcpd and the tftp-hpa daemon."
 }
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -455,24 +458,8 @@
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 kernel_install() {
 
-# Install the kernel package
-
-    # create tftp boot images
     call_with_stamp install_kernel_nfsroot
-
-    # setup for DHCP, BOOTP or both
-    [ "x$FAI_BOOT" = "x" ] && FAI_BOOT="dhcp"
-    
-    for bootopt in $FAI_BOOT; do
-    	case $bootopt in
-    		dhcp|DHCP)      
-			call_with_stamp setup_dhcp ;;
-    		bootp|BOOTP)      
-			echo "You have to setup BOOTP support manually." ;;
-		*)
-			echo "Unknown boot option" ;;
-    	esac
-    done
+    call_with_stamp setup_dhcp
 }
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 run_hooks() {




More information about the Fai-commit mailing list