[Fai-commit] r5351 - in trunk: bin debian

Thomas Lange lange at alioth.debian.org
Fri Apr 17 15:26:18 UTC 2009


Author: lange
Date: 2009-04-17 15:26:18 +0000 (Fri, 17 Apr 2009)
New Revision: 5351

Modified:
   trunk/bin/fai
   trunk/debian/changelog
Log:
  always change HOSTNAME when -u was used (closes: #456978)
  add -u to help message

Modified: trunk/bin/fai
===================================================================
--- trunk/bin/fai	2009-04-17 13:48:03 UTC (rev 5350)
+++ trunk/bin/fai	2009-04-17 15:26:18 UTC (rev 5351)
@@ -118,13 +118,14 @@
     cat <<-EOF
 	fai $FAI_VERSION. Copyright (C) 1999-2009 Thomas Lange
 	Usage: $0 [options] [action]
-       
+
 	Options:
-	   -v|--verbose      display more information during the update
-	   -h|--help         display this help message
-	   -N|--new          renew list of classes
-	   -c|--class        comma separated list of classes
-	   -C|--cfdir CFDIR  Use CFDIR for  reading the config files
+	   -v|--verbose         display more information during the update
+	   -h|--help            display this help message
+	   -N|--new             renew list of classes
+	   -c|--class           comma separated list of classes
+	   -C|--cfdir CFDIR     Use CFDIR for  reading the config files
+           -u|--hostname HNAME  set hostname to be used
 
 EOF
     exit 0
@@ -267,9 +268,7 @@
 [ -f /proc/version ] || mount -n -t proc proc /proc # ubuntu initrd does not mount /proc
 export start_seconds=$(cut -d . -f 1 /proc/uptime)
 
-if [ X$action = Xdirinstall -a -n "$newhostname" ]; then
-    export HOSTNAME=$newhostname
-fi
+[ -n "$newhostname" ] && export HOSTNAME=$newhostname
 
 if [ $do_init_tasks -eq 1 ]; then
     # we are running an initial installation
@@ -287,9 +286,9 @@
 chmod 0750 $LOGDIR
 
 fai_init
+[ -n "$newhostname" ] && echo "Hostname set to $HOSTNAME" | tee -a $LOGDIR/fai.log
+unset newhostname
 if [ X$action = Xdirinstall ]; then
-    [ -n "$newhostname" ] && echo "Hostname set to $HOSTNAME" | tee -a $LOGDIR/fai.log
-    unset newhostname
     skiptask confdir
     export FAI=$FAI_CONFIGDIR
     set -a

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2009-04-17 13:48:03 UTC (rev 5350)
+++ trunk/debian/changelog	2009-04-17 15:26:18 UTC (rev 5351)
@@ -32,6 +32,8 @@
   * fai: set STOP_ON_ERROR to 700, this can be overwritten by fai.conf or
     in a file called class/*.var (closes: #515139),
     create /var/run/fai (closes: #515775)
+    always change HOSTNAME when -u was used (closes: #456978)
+    add -u to help message
   * fai-client.dirs, fai-server.dirs: remove /var/run/fai
   * subroutines: add trap for softupdates (closes: #449236)
     stop_fai_installation() sends message to faimond
@@ -107,7 +109,7 @@
     be created (i.e., it will not be preserved)
   * fai-gude.sgml: add hint how to avoid this bug (closes: #265973)
 
- -- Thomas Lange <lange at debian.org>  Fri, 17 Apr 2009 14:35:50 +0200
+ -- Thomas Lange <lange at debian.org>  Fri, 17 Apr 2009 17:18:46 +0200
 
 fai (3.2.17) unstable; urgency=medium
 




More information about the Fai-commit mailing list