From: Jason Ish Date: Tue, 6 Jun 2023 21:32:18 +0000 (-0600) Subject: install: create runtime data directory X-Git-Tag: suricata-6.0.13~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f7b7e0b26df9d948549d7ccf40c1a5e41623fd8;p=thirdparty%2Fsuricata.git install: create runtime data directory On installation, make sure the data directory is created. This will usually be /var/lib/suricata/data, but otherwise follows the autoconf/automake instructions. This directory is for runtime state information, which for now is datasets but may be expanded in the future. Suricata already expects this directory to exist for "state" and "save" datasets, but it has been up to the user to create it. --- diff --git a/Makefile.am b/Makefile.am index d6c4503c05..4aabc18bd1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -30,6 +30,7 @@ install-conf: install -d "$(DESTDIR)$(e_logcertsdir)" install -d "$(DESTDIR)$(e_rundir)" install -m 770 -d "$(DESTDIR)$(e_localstatedir)" + install -m 770 -d "$(DESTDIR)$(e_datadir)" install-rules: if INSTALL_SURICATA_UPDATE diff --git a/configure.ac b/configure.ac index 83acfbc8f9..010e115fc5 100644 --- a/configure.ac +++ b/configure.ac @@ -2783,6 +2783,7 @@ AC_SUBST(e_logcertsdir) AC_SUBST(e_sysconfdir) AC_DEFINE_UNQUOTED([CONFIG_DIR],["$e_sysconfdir"],[Our CONFIG_DIR]) AC_SUBST(e_localstatedir) +AC_SUBST(e_datadir) AC_DEFINE_UNQUOTED([DATA_DIR],["$e_datadir"],[Our DATA_DIR]) AC_SUBST(e_magic_file) AC_SUBST(e_magic_file_comment)