Skip to content

Commit

Permalink
add -s
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Lange committed Oct 28, 2017
1 parent 5a61a2e commit d8407ca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bin/fai-mirror
Expand Up @@ -192,7 +192,7 @@ verbose=0
add=1
qflag=-qq
bcount=0
while getopts "a:bBvhx:pc:C:m:P:" opt ; do
while getopts "a:bBvhx:pc:C:m:s:P:" opt ; do
case "$opt" in
a) arch=$OPTARG ;;
B) add=0 ; ((bcount++)) ;;
Expand All @@ -203,6 +203,7 @@ while getopts "a:bBvhx:pc:C:m:P:" opt ; do
c) cclasses="$OPTARG";;
m) MAXPACKAGES="$OPTARG";;
p) preserve=1;;
s) csdir="$OPTARG";;
v) verbose=1; vflag=-v; qflag='';;
P) aptpref="$OPTARG";;
?) die 1 "Unknown option";;
Expand All @@ -221,9 +222,11 @@ cfdir=$(readlink -f $cfdir) # canonicalize path
. $cfdir/fai.conf
. $cfdir/nfsroot.conf
: ${MNTPOINT:=/media/mirror} # default value

export NFSROOT

if [ -n "$csdir" ]; then
FAI_CONFIGDIR=$csdir # override by -s
fi
[ -x "$(which reprepro)" ] || die 8 "reprepro not found. Please install the package."
[ -n "$exclasses" -a -n "$cclasses" ] && die 3 "Options -x and -c not allowed at the same time."

Expand Down
3 changes: 3 additions & 0 deletions man/fai-mirror.1
Expand Up @@ -86,6 +86,9 @@ Set the number of packages to NUM. This overwrites the variable MAXPACKAGES.
Exclude these classes. Do not add the packages of these classes to
the mirror.
.TP
.B "\-s " DIRECTORY
Override the value of FAI_CONFIGDIR set in nfsroot.conf.
.TP
.B "\-P " FILE
Copy an APT preferences file into the cache config before creating the
mirror. Using this you can set pin priority for packages to a certain release.
Expand Down

0 comments on commit d8407ca

Please sign in to comment.