/usr/lib/fai/get-config-dir-cvs is in fai-client 3.4.8ubuntu2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | #!/bin/bash
# (c) 2002-2006 Henning Glawe <glaweh@debian.org>
### BEGIN SUBROUTINE INFO
# Provides-Var:
# Requires-Var: $FAI_CONFIG_SRC $FAI $LOGDIR
# Suggests-Var:
# Short-Description: get $FAI from a cvs repository.
### END SUBROUTINE INFO
# matched string: "cvs[+ssh]://user@host/path/to/cvsroot module[=tag]"
# dir contains user@host/path/to/cvsroot
protocol=$(expr match "$FAI_CONFIG_SRC" '\([^:]*\)://')
dir=$(expr match "$FAI_CONFIG_SRC" '[^:]*://\([^[:space:]]\+\)[[:space:]]\+')
module=$(expr match "$FAI_CONFIG_SRC" '[^:]*://.*[[:space:]]\+\([^=]*\)')
tag=$(expr match "$FAI_CONFIG_SRC" '[^=]*=\([^=]*\)')
case $protocol in
cvs+ssh)
export CVS_RSH=ssh
export CVSROOT=":ext:$dir"
;;
cvs)
export CVSROOT=":pserver:$dir"
;;
*)
echo "get-config-dir-cvs: protocol $protocol not implemented"
exit 1
;;
esac
[ -n "$tag" ] && tag="-r $tag"
if [ -d "$FAI/CVS" ] ; then
echo "Updating CVS in $FAI"
cd $FAI
cvs -q up -P $tag -d -C > $LOGDIR/getconf.log
task_error 701 $?
else
echo "Checking out CVS"
cd ${FAI%/*} # cd to dirname $FAI
cvs -q co -P -d ${FAI##*/} $tag $module > $LOGDIR/getconf.log # -d uses basename of $FAI
task_error 702 $?
fi
|