xinetd-respect-custom-server-root.patch 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. diff --git a/configure b/configure
  2. index 067affe..c78a9f6 100755
  3. --- a/configure
  4. +++ b/configure
  5. @@ -340,12 +340,14 @@ sed -i -e "s:@XINETD_CONF@:${XINETD_CONF}:" Makefile
  6. printf "done\\n"
  7. -# Also sub in $HOSTNAME to the various init systems (whether or not we really
  8. -# use them, its just easier)
  9. +# Also sub in $GOPHERROOT and $HOSTNAME to the various init systems
  10. +# (whether or not we really use them, its just easier)
  11. for f in gophernicus.env haiku_snippet org.gophernicus.server.plist \
  12. gophernicus.xinetd; do
  13. printf "creating init/${f}... "
  14. - sed -e "s:@HOSTNAME@:${HOSTNAME}:" "init/${f}.in" > "init/${f}"
  15. + cp init/${f}{.in,}
  16. + sed -i -e "s:@GOPHERROOT@:${GOPHERROOT}:" init/${f}
  17. + sed -i -e "s:@HOSTNAME@:${HOSTNAME}:" init/${f}
  18. printf "done\\n"
  19. done
  20. diff --git a/init/gophernicus.xinetd.in b/init/gophernicus.xinetd.in
  21. index 4f2c921..a052375 100644
  22. --- a/init/gophernicus.xinetd.in
  23. +++ b/init/gophernicus.xinetd.in
  24. @@ -6,6 +6,6 @@ service gopher
  25. wait = no
  26. user = nobody
  27. server = @BINARY@
  28. - server_args = -r/var/gopher -h@HOSTNAME@
  29. + server_args = -r@GOPHERROOT@ -h@HOSTNAME@
  30. disable = no
  31. }