summaryrefslogtreecommitdiff
path: root/pcr-testing/gophernicus/xinetd-respect-custom-server-root.patch
blob: b0106639b1eb4a9303ba0258e4ed1eeb33787b1e (plain)
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
diff --git a/configure b/configure
index 067affe..c78a9f6 100755
--- a/configure
+++ b/configure
@@ -340,12 +340,14 @@ sed -i -e "s:@XINETD_CONF@:${XINETD_CONF}:" Makefile
 
 printf "done\\n"
 
-# Also sub in $HOSTNAME to the various init systems (whether or not we really
-# use them, its just easier)
+# Also sub in $GOPHERROOT and $HOSTNAME to the various init systems
+# (whether or not we really use them, its just easier)
 for f in gophernicus.env haiku_snippet org.gophernicus.server.plist \
     gophernicus.xinetd; do
     printf "creating init/${f}... "
-    sed -e "s:@HOSTNAME@:${HOSTNAME}:" "init/${f}.in" > "init/${f}"
+    cp init/${f}{.in,}
+    sed -i -e "s:@GOPHERROOT@:${GOPHERROOT}:" init/${f}
+    sed -i -e "s:@HOSTNAME@:${HOSTNAME}:" init/${f}
     printf "done\\n"
 done
 
diff --git a/init/gophernicus.xinetd.in b/init/gophernicus.xinetd.in
index 4f2c921..a052375 100644
--- a/init/gophernicus.xinetd.in
+++ b/init/gophernicus.xinetd.in
@@ -6,6 +6,6 @@ service gopher
 	wait		= no
 	user		= nobody
 	server		= @BINARY@
-	server_args	= -r/var/gopher -h@HOSTNAME@
+	server_args	= -r@GOPHERROOT@ -h@HOSTNAME@
 	disable		= no
 }