From b9fc8ed51c52e50dc5d00edc8718eb2076f0abbb Mon Sep 17 00:00:00 2001 From: levasseur Date: Mon, 21 Feb 2022 18:47:08 +0100 Subject: [PATCH] as REBOOT_NEEDED variable is independant on every module, the function to set it is no longuer needed --- lib/utils.sh | 13 ------------- modules/authnz.sh | 3 ++- modules/conf_network.sh | 4 ++-- modules/install_desktop.sh | 5 +++-- modules/select_system_proxy.sh | 4 ++-- 5 files changed, 9 insertions(+), 20 deletions(-) diff --git a/lib/utils.sh b/lib/utils.sh index 5deaa20..e266e29 100644 --- a/lib/utils.sh +++ b/lib/utils.sh @@ -60,17 +60,4 @@ set_system_proxy() } export -f set_system_proxy - -# ------------------------------------------------------------------------------ -# Set a reboot nedeed flag to display a warning at the end -set_reboot_needed() -{ - if [[ $NEED_REBOOT==true ]]; then - # Reboot flag already set, nothing to do - return 0 - else - export NEED_REBOOT=true - fi -} - # EOF diff --git a/modules/authnz.sh b/modules/authnz.sh index c9eb8b8..2a16c69 100644 --- a/modules/authnz.sh +++ b/modules/authnz.sh @@ -20,7 +20,7 @@ # * DEFAULT_SHELL: The shell to use when creating new users # ------------------------------------------------------------------------------ -export VER_authnz=0.2.0 +export VER_authnz=0.2.1 export DEP_authnz="upgrade_dist" # Users (from Ldap) @@ -119,6 +119,7 @@ authnz() prnt I "Creating user $usr..." create_local_user $usr done + NEED_REBOOT=true } precheck_authnz() diff --git a/modules/conf_network.sh b/modules/conf_network.sh index 139d7b5..81ee6eb 100644 --- a/modules/conf_network.sh +++ b/modules/conf_network.sh @@ -20,7 +20,7 @@ # * NET{4,6}_MANUAL_FILE_$iface: filename for manual configuration of $iface # ------------------------------------------------------------------------------ -export VER_conf_network="0.0.7" +export VER_conf_network="0.0.8" export DEP_conf_network="install_pkg" conf_network() @@ -101,7 +101,7 @@ conf_network() done unset iface if_file - set_reboot_needed + NEED_REBOOT=true } precheck_conf_network() diff --git a/modules/install_desktop.sh b/modules/install_desktop.sh index e81a681..797cc52 100644 --- a/modules/install_desktop.sh +++ b/modules/install_desktop.sh @@ -15,7 +15,7 @@ # * X11_DRV: Used to install proprietary driver for X.org (eg: nvidia-drivers) # ------------------------------------------------------------------------------ -export VER_install_desktop="0.0.4" +export VER_install_desktop="0.0.5" export DEP_install_desktop="upgrade_dist" install_desktop() @@ -28,7 +28,8 @@ install_desktop() prnt I "Installing $UBUNTU_FLAVOR environment..." pkginst ${UBUNTU_FLAVOR}-desktop fi - set_reboot_needed + # Because we're lazy but manual actions can avoid reboot... + NEED_REBOOT=true } precheck_install_desktop() diff --git a/modules/select_system_proxy.sh b/modules/select_system_proxy.sh index 8172c7f..e57dce2 100644 --- a/modules/select_system_proxy.sh +++ b/modules/select_system_proxy.sh @@ -8,7 +8,7 @@ # https://opensource.org/licenses/BSD-3-Clause # ------------------------------------------------------------------------------ -export VER_select_system_proxy="0.0.2" +export VER_select_system_proxy="0.0.3" export DEP_select_system_proxy="upgrade_dist" select_system_proxy() @@ -20,7 +20,7 @@ select_system_proxy() else prnt I "Pas de configurtion proxy, rien à faire." fi - set_reboot_needed + NEED_REBOOT=true } precheck_select_system_proxy()