diff options
author | Sami Kerola <kerolasa@iki.fi> | 2019-07-18 19:37:55 +0100 |
---|---|---|
committer | Sami Kerola <kerolasa@iki.fi> | 2019-07-20 09:29:08 +0100 |
commit | aa40e9d395ec14d0a78c2cd28d51dd332755ab08 (patch) | |
tree | c5618428fbb1e739828f90cf95ec1707209d22fc | |
parent | 7024b189c4d19f923f629baed4215d784125fa82 (diff) | |
download | iputils-aa40e9d395ec14d0a78c2cd28d51dd332755ab08.tar.gz |
tftpd: add example xinetd file
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
-rw-r--r-- | meson.build | 1 | ||||
-rw-r--r-- | tftpd/meson.build | 12 | ||||
-rw-r--r-- | tftpd/xinetd.conf.in | 10 |
3 files changed, 23 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 748749f..1879048 100644 --- a/meson.build +++ b/meson.build @@ -2,6 +2,7 @@ project('iputils', 'c', default_options : [ 'c_std=c99', 'warning_level=3', + 'localstatedir=var', ], meson_version : '>=0.39', version : 's20190709') # keep in sync with: git describe | awk -F- '{print $1}' diff --git a/tftpd/meson.build b/tftpd/meson.build index 527a54f..0dd09a5 100644 --- a/tftpd/meson.build +++ b/tftpd/meson.build @@ -4,3 +4,15 @@ executable('tftpd', ['tftpd.c', 'tftpsubs.c', git_version_h], include_directories : inc, link_with : [libcommon], install: true) + +subs = configuration_data() +subs.set('sbindir', join_paths(get_option('prefix'), get_option('sbindir'))) +subs.set('tftpdatadir', join_paths(get_option('prefix'), get_option('localstatedir'))) +unit_file = configure_file( + input: 'xinetd.conf.in', + output: 'tftp', + configuration: subs +) +etcdir = join_paths(get_option('prefix'), get_option('sysconfdir')) +xinetdir = join_paths(etcdir, 'xinetd.d') +install_data(unit_file, install_dir: xinetdir) diff --git a/tftpd/xinetd.conf.in b/tftpd/xinetd.conf.in new file mode 100644 index 0000000..8f8eb64 --- /dev/null +++ b/tftpd/xinetd.conf.in @@ -0,0 +1,10 @@ +service tftp +{ + socket_type = dgram + protocol = udp + wait = yes + user = nobody + server = @sbindir@/tftpd + server_args = @tftpdatadir@/tftpboot + disable = yes +} |