[Fai-commit] r4559 - in trunk: bin man
lange at alioth.debian.org
lange at alioth.debian.org
Fri Sep 7 15:16:54 UTC 2007
Author: lange
Date: 2007-09-07 15:16:54 +0000 (Fri, 07 Sep 2007)
New Revision: 4559
Modified:
trunk/bin/fai-chboot
trunk/man/fai-chboot.8
Log:
add option -C and support for $FAI_ETC_DIR
Modified: trunk/bin/fai-chboot
===================================================================
--- trunk/bin/fai-chboot 2007-09-07 14:12:01 UTC (rev 4558)
+++ trunk/bin/fai-chboot 2007-09-07 15:16:54 UTC (rev 4559)
@@ -28,7 +28,7 @@
#*********************************************************************
# variable needed: $nfsroot
-$version="version 3.4 19-august-2007";
+$version="version 3.4.1 7-september-2007";
use Socket;
use Net::hostent;
@@ -358,13 +358,14 @@
}
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-getopts('gBc:D:edhnvlLiIpf:Fk:Ss:to') || usage;
+getopts('gBc:C:D:edhnvlLiIpf:Fk:Ss:to') || usage;
$opt_h and usage;
defined @ARGV or usage;
$opt_n and $opt_v = 1;
$opt_v and $verbose = 1;
$pxedir = $opt_D || '/srv/tftp/fai/pxelinux.cfg';
+$cfdir = $opt_C || $ENV{'FAI_ETC_DIR'} || '/etc/fai';
$opt_L and $opt_l = 1;
$opt_l and lsdir(@ARGV);
($opt_B and $opt_F) && die "ERROR: use only one option out of -B and -F\n";
@@ -411,11 +412,11 @@
}
# read the nfsroot variable; a little bit ugly, but it works
-$nfsroot = `. /etc/fai/make-fai-nfsroot.conf 2>/dev/null; echo \$NFSROOT`;
+$nfsroot = `. $cfdir/make-fai-nfsroot.conf 2>/dev/null; echo \$NFSROOT`;
chomp $nfsroot;
$nfsroot = '/srv/fai/nfsroot' unless $nfsroot;
-$tftproot = `. /etc/fai/make-fai-nfsroot.conf 2>/dev/null; echo \$TFTPROOT`;
+$tftproot = `. $cfdir/make-fai-nfsroot.conf 2>/dev/null; echo \$TFTPROOT`;
chomp $tftproot;
$tftproot = '/srv/tftp/fai' unless $tftproot;
Modified: trunk/man/fai-chboot.8
===================================================================
--- trunk/man/fai-chboot.8 2007-09-07 14:12:01 UTC (rev 4558)
+++ trunk/man/fai-chboot.8 2007-09-07 15:16:54 UTC (rev 4559)
@@ -1,5 +1,5 @@
.\" Hey, EMACS: -*- nroff -*-
-.TH fai-chboot 8 "3 august" "FAI 3.2"
+.TH fai-chboot 8 "7 september" "FAI 3.2"
.SH NAME
fai-chboot \- manage the network boot configuration files
.SH SYNOPSIS
@@ -43,6 +43,10 @@
Copy an existing config file to one or more hosts or templates and enable
them for network booting.
.TP
+.BI "\-C " CFDIR
+Use CFDIR as configuration directory. Default is /etc/fai. You can
+also set the environment variable FAI_ETC_DIR.
+.TP
.BI "\-D " DIR
Set the default directory for the network boot configuration to
DIR. The default value is /srv/tftp/fai/pxelinux.cfg/.
More information about the Fai-commit
mailing list