mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
extension: net: Refactor, fix and improve network extensions
- Rename extensions with "net-*" prefix - Put the extensions into their own folder - Split off time sync packages into their own extensions to be able to be used separately - Put their config files into directories instead of using inline `cat <<- EOF >` - Move some other NetworkManager related stuff into the extension - Remove unneeded steps - Install iproute2 by default on all images (for the `ip` command)
This commit is contained in:
@@ -476,6 +476,14 @@ function enable_extension() {
|
||||
extension_dir="${extension_base_path}" # this is misleading. only directory-based extensions should have this.
|
||||
extension_file="${extension_floating_file}"
|
||||
break
|
||||
else
|
||||
# Search for the extension file in any subdirectory
|
||||
extension_file=$(find "${extension_base_path}" -type f -name "${extension_name}.sh" | head -n 1) # Example format: extensions/network/net-network-manager.sh
|
||||
if [[ -n "${extension_file}" ]]; then
|
||||
# Extract extension dir from file, e.g. from "extensions/network/net-network-manager.sh" the dir "extensions/network/" gets extracted
|
||||
extension_dir="${extension_file%/*}"
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user