summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThijs Paelman <thijs@ouroboros.rocks>2025-12-06 13:31:54 +0100
committerDimitri Staessens <dimitri@ouroboros.rocks>2025-12-22 12:13:08 +0100
commit512004f0a2a4a4a9b95312505202af8a7872873b (patch)
treebe173f935ae3c6e1865372662b580179144dd17f
parentacdbb2901ee93aa84fbc6d740a230061e5bfaab1 (diff)
downloadouroboros-512004f0a2a4a4a9b95312505202af8a7872873b.tar.gz
ouroboros-512004f0a2a4a4a9b95312505202af8a7872873b.zip
build: Copy empty config file on installbe
A valid but empty config file is placed at install. This does not overwrite old config files. It is also not removed on uninstall. Signed-off-by: Thijs Paelman <thijs@ouroboros.rocks> Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
-rw-r--r--irmd.conf.in13
-rw-r--r--src/irmd/CMakeLists.txt9
2 files changed, 11 insertions, 11 deletions
diff --git a/irmd.conf.in b/irmd.conf.in
index cdfd0309..da5a3288 100644
--- a/irmd.conf.in
+++ b/irmd.conf.in
@@ -1,21 +1,16 @@
### Example Ouroboros configuration file
#
# This file contains a summary of current machine configuration options
-# for the O7s prototype. The IRMd systemd service will by default
-# attempt to load its configuration file during startup from the file
-# @OUROBOROS_CONFIG_DIR@/@OUROBOROS_CONFIG_FILE@.
-# If not found, it will error out.
+# for the O7s prototype.
#
-# At the top level, it accepts configuration of
-# services via the "name" directive, and configuration of the network
-# specifying different IPCPs in the system. So, the list of accepted
-# top level stanza is:
+# The list of accepted top level stanza is:
#
# [name.<name of service>] add a new name to the system.
# [local.<name for IPCP>] add a new local IPCP to the system.
# [eth-llc.<name for IPCP>] add a new IPCP over Ethernet (LLC) to the system.
# [eth-dix.<name for IPCP>] add a new IPCP over Ethernet (DIX) to the system.
-# [eth-udp.<name for IPCP>] add a new IPCP over UDP/IPv4 to the system.
+# [udp4.<name for IPCP>] add a new IPCP over UDP/IPv4 to the system.
+# [udp6.<name for IPCP>] add a new IPCP over UDP/IPv6 to the system.
# [broadcast.<name of IPCP>] add a new broadcast IPCP to the system.
# [unicast.<name of IPCP>] add a new unicast IPCP to the system.
#
diff --git a/src/irmd/CMakeLists.txt b/src/irmd/CMakeLists.txt
index 79f806bb..a9584b85 100644
--- a/src/irmd/CMakeLists.txt
+++ b/src/irmd/CMakeLists.txt
@@ -20,9 +20,14 @@ if (LIBTOML_LIBRARIES)
message(STATUS "Configuration directory: ${OUROBOROS_CONFIG_DIR}")
set(INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
configure_file("${CMAKE_SOURCE_DIR}/irmd.conf.in"
- "${CMAKE_BINARY_DIR}/irmd.conf.example" @ONLY)
- install(FILES "${CMAKE_BINARY_DIR}/irmd.conf.example"
+ "${CMAKE_BINARY_DIR}/${OUROBOROS_CONFIG_FILE}.example" @ONLY)
+ install(FILES "${CMAKE_BINARY_DIR}/${OUROBOROS_CONFIG_FILE}.example"
DESTINATION "${OUROBOROS_CONFIG_DIR}")
+ install(CODE "
+ if (NOT EXISTS \"${OUROBOROS_CONFIG_DIR}/${OUROBOROS_CONFIG_FILE}\")
+ file(WRITE \"${OUROBOROS_CONFIG_DIR}/${OUROBOROS_CONFIG_FILE}\" \"\")
+ endif()
+ ")
unset(INSTALL_DIR)
find_path(LIBTOML_INCLUDE toml.h)
mark_as_advanced(LIBTOML_LIBRARIES LIBTOML_INCLUDE)