From 8773baa45d19e32b5462f27d8da87da1d35e903e Mon Sep 17 00:00:00 2001 From: Saverio Miroddi Date: Fri, 30 Apr 2021 19:43:15 +0200 Subject: [PATCH 1/3] Fix prepare_standard_repositories_Linuxmint() endless loop --- install-zfs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install-zfs.sh b/install-zfs.sh index 03ebe0e..185bac1 100755 --- a/install-zfs.sh +++ b/install-zfs.sh @@ -547,7 +547,7 @@ function prepare_standard_repositories_Linuxmint { # The universe repository may be already enabled, but it's more solid to ensure it. # - invoke "prepare_standard_repositories" + prepare_standard_repositories } function prepare_standard_repositories_Debian { @@ -1320,7 +1320,7 @@ function install_jail_zfs_packages_UbuntuServer { if [[ $v_use_ppa != "1" ]]; then chroot_execute "apt install --yes zfsutils-linux zfs-initramfs" else - invoke "install_jail_zfs_packages" + install_jail_zfs_packages fi } From cf2f9267205e4c83dd484f5cc3c2b8571919ed2f Mon Sep 17 00:00:00 2001 From: Saverio Miroddi Date: Fri, 30 Apr 2021 19:44:29 +0200 Subject: [PATCH 2/3] Add comment to invoke() about potential mistake --- install-zfs.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install-zfs.sh b/install-zfs.sh index 185bac1..b821d9d 100755 --- a/install-zfs.sh +++ b/install-zfs.sh @@ -150,6 +150,9 @@ c_udevadm_settle_timeout=10 # seconds # A target function must exist, otherwise a error is raised, unless `--optional` is specified. # `--optional` is useful when a step is specific to a single distribution, e.g. Debian's root password. # +# WATCH OUT! Don't forget *not* to call this from an ovverridden function, otherwise, it will call itself +# endlessly! +# # Examples: # # $ function install_jail_zfs_packages { :; } From 62facba704917852112297c5528fa0b9ea4f9332 Mon Sep 17 00:00:00 2001 From: Saverio Miroddi Date: Fri, 30 Apr 2021 19:45:50 +0200 Subject: [PATCH 3/3] Fix invoke() example --- install-zfs.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install-zfs.sh b/install-zfs.sh index b821d9d..861ad93 100755 --- a/install-zfs.sh +++ b/install-zfs.sh @@ -157,17 +157,17 @@ c_udevadm_settle_timeout=10 # seconds # # $ function install_jail_zfs_packages { :; } # $ function install_jail_zfs_packages_Debian { :; } -# $ distro_dependent_invoke "install_jail_zfs_packages" +# $ invoke "install_jail_zfs_packages" # # If the distribution is `Debian`, the second will be invoked, otherwise, the first. # # $ function update_zed_cache_Ubuntu { :; } -# $ distro_dependent_invoke "update_zed_cache" --optional +# $ invoke "update_zed_cache" --optional # # If the distribution is `Debian`, nothing will happen. # # $ function update_zed_cache_Ubuntu { :; } -# $ distro_dependent_invoke "update_zed_cache" +# $ invoke "update_zed_cache" # # If the distribution is `Debian`, an error will be raised. #