Skip to content

Commit

Permalink
add -b
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Lange committed Nov 27, 2015
1 parent 69ec83a commit 95aeca1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
6 changes: 4 additions & 2 deletions bin/fai-mirror
Expand Up @@ -194,10 +194,11 @@ preserve=0
verbose=0
add=1
qflag=-qq
while getopts "a:Bvhx:pc:C:m:P:" opt ; do
while getopts "a:bBvhx:pc:C:m:P:" opt ; do
case "$opt" in
a) arch=$OPTARG ;;
B) add=0 ;;
B) add=0 ; ((bcount++)) ;;
b) add=2 ; ((bcount++)) ;;
C) cfdir=$OPTARG ;;
h) usage ;;
x) exclasses="$OPTARG";;
Expand All @@ -218,6 +219,7 @@ shift $(($OPTIND - 1))
cfdir=$(readlink -f $cfdir) # canonicalize path
[ ! -d "$cfdir" ] && die 6 "$cfdir is not a directory"
[ "$verbose" -eq 1 ] && echo "Using configuration files from $cfdir"
[ $bcount -ge 1 ] && die 7 "You can't use -b and -B simultaneously."
. $cfdir/fai.conf
. $cfdir/nfsroot.conf
: ${MNTPOINT:=/media/mirror} # default value
Expand Down
17 changes: 12 additions & 5 deletions man/fai-mirror.1
@@ -1,7 +1,7 @@
.\" Hey, EMACS: -*- nroff -*-
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
.TH fai-mirror 1 "28 July 2010" "FAI 4.0"
.TH fai-mirror 1 "November 2015" "FAI 5.0"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
Expand Down Expand Up @@ -56,9 +56,16 @@ Download packages from architecture ARCH. If not specified, use native
architecture of host.
.TP
.BI \-B
Do not add packages included in base.tgz and packages defined in
nfsroot.conf to the mirror. By default all these packages are
included in the mirror.
Do not add packages included in base.tar.xz and packages defined in
/etc/fai/NFSROOT to the mirror. By default all these packages are
included in the mirror. This will explicitly remove packages from the
mirror that are already in base.tar.xz.
.TP
.BI \-b
Create the mirror only from packages names in /srv/fai/config. Do not
include packages from /etc/fai/NFSROOT, but also do not remove
packages that are in base.tar.xz. This is useful if your partitial
mirror does not match the Linux distribution of the nfsroot.
.TP
.B \-C CFDIR
Use CFDIR as the configuration directory. Default is /etc/fai. You can
Expand Down Expand Up @@ -141,7 +148,7 @@ the variable FAI_CONFIGDIR.
.TP

.FN $NFSROOT/var/tmp/base-pkgs.lis
The list of packages included in base.tgz inside the nfsroot.
The list of packages included in base.tar.xz inside the nfsroot.
.TP

.FN $NFSROOT/var/tmp/packages.nfsroot
Expand Down

0 comments on commit 95aeca1

Please sign in to comment.