From 7b09d0a982cf3e2dcade91a632175040e77661b4 Mon Sep 17 00:00:00 2001 From: Florian Franzmann Date: Sun, 1 Aug 2021 14:50:58 +0200 Subject: net/net-tools: use IFUPDOWN provider --- net/net-tools/HISTORY | 3 +++ net/net-tools/PREPARE | 4 ++-- net/net-tools/UP_TRIGGERS | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) (limited to 'net') diff --git a/net/net-tools/HISTORY b/net/net-tools/HISTORY index 5ddb397f3e..8eb03b0dfa 100644 --- a/net/net-tools/HISTORY +++ b/net/net-tools/HISTORY @@ -1,3 +1,6 @@ +2021-08-01 Florian Franzmann + * PREPARE, UP_TRIGGERS: use IFUPDOWN provider + 2021-03-13 Florian Franzmann * DETAILS: version 2.10 diff --git a/net/net-tools/PREPARE b/net/net-tools/PREPARE index a170d4abdc..f0efff2c68 100755 --- a/net/net-tools/PREPARE +++ b/net/net-tools/PREPARE @@ -1,6 +1,6 @@ persistent_add NETTOOLSHASTIME && persistent_add NETTOOLSNEW && -if ! spell_ok ifupdown ; then +if ! provider_ok IFUPDOWN ; then NETTOOLSNEW="y" && # Have to cheat to get a config option over into ifupdown touch ${INSTALL_ROOT}/tmp/net-toolsNewInstall && @@ -13,7 +13,7 @@ if ! spell_ok ifupdown ; then message "But if you reboot, no network connections will come up." && message "Because of this, you must say y to the following question, or this" && message "spell will not install." && - message "Right after casting this spell, you need to cast ifupdown.${DEFAULT_COLOR}" && + message "Right after casting this spell, you need to cast the provider of IFUPDOWN.${DEFAULT_COLOR}" && config_query NETTOOLSHASTIME "Do you have time to configure your nifty new networking?" n && if [[ "$NETTOOLSHASTIME" != "y" ]]; then diff --git a/net/net-tools/UP_TRIGGERS b/net/net-tools/UP_TRIGGERS index 27c59e7e73..5f5b4f7074 100755 --- a/net/net-tools/UP_TRIGGERS +++ b/net/net-tools/UP_TRIGGERS @@ -1,3 +1,6 @@ if [[ "$NETTOOLSNEW" == "y" ]]; then - up_trigger ifupdown cast_self + local IFUPDOWN="$(get_spell_provider IFUPDOWN)" + if [[ ! -z "$IFUPDOWN" ]] && spell_installed "$IFUPDOWN"; then + up_trigger "$IFUPDOWN" cast_self + fi fi -- cgit v1.2.3