Commit 3a65e5f3 authored by ssrq's avatar ssrq

[type/__interface_ifupdown.d] Require base interfaces file first

parent 5866dda7
Pipeline #3132 passed with stage
in 58 seconds
#!/bin/sh -e
#
# 2020 Dennis Camera (dennis.camera@ssrq-sds-fds.ch)
# 2020-2021 Dennis Camera (dennis.camera@ssrq-sds-fds.ch)
#
# This file is part of cdist.
#
......@@ -98,6 +98,7 @@ in
# The /etc/network/interfaces file is overwritten with a basic example.
__file "${INTERFACES_FILE}" --state present --owner root --mode 0644 \
--source "${__type}/files/interfaces"
export require="__file${INTERFACES_FILE}"
else
# If state is present and IFUPDOWND_LEAVE_EXISTING_CONFIG is set,
# ensure that the interfaces.d directory is sourced in the main
......@@ -106,6 +107,7 @@ in
--file "${INTERFACES_FILE}" \
--before '^#?[:blank:]*(auto|no-auto-down|no-scripts|allow-|iface|mapping|rename|source|source-directory)|^#[[:blank:]]*The .* interface$' \
--line "source ${INTERFACES_D_PATH}/*"
export require="__line${INTERFACES_FILE}:source_interfaces.d"
fi
__directory "${INTERFACES_D_PATH}" --state pre-exists \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment