This file is indexed.

/usr/lib/fai/get-config-dir-git is in fai-client 3.4.8ubuntu5.

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
#!/bin/bash

# (c) 2002-2006 Henning Glawe <glaweh@debian.org>
# (c) 2007 Holger Levsen <holger@layer-acht.org> for the modifications to use git

### BEGIN SUBROUTINE INFO
# Provides-Var:
# Requires-Var:    $FAI_CONFIG_SRC $FAI $LOGDIR
# Suggests-Var:
# Short-Description: get $FAI from a git repository.
### END SUBROUTINE INFO

# matched string: "git://gitpath"
protocol=$(expr match "$FAI_CONFIG_SRC" '\([^:]*\)://')
gitpath=$(expr match "$FAI_CONFIG_SRC" '[^:]*://\([^[:space:]]\+\)')

case $protocol in
	git)
		giturl="git://$gitpath"
		;;
	git+http)
		echo git+http
		giturl="http://$gitpath"
		;;
	*)
		echo "get-config-dir-git: protocol $protocol not implemented"
		exit 1
		;;
esac
		
if [ -d "$FAI/.git" ] ; then
   echo "Updating git copy in $FAI"
   cd $FAI
   git pull
   task_error 701 $?
else 
   echo "Checking out from git"
   # cloning into an existing directory is not allowed
   if [ -d $FAI ]; then rmdir $FAI; fi
   git clone $giturl $FAI 
   task_error 702 $?
fi