gluon-core: add option to exclude upgrade scripts that alter system invasivly

This allows the user to build a "vanilla" image that can still include 
gluon components such as gluon-mmfd easily
This commit is contained in:
Maciej Krüger 2023-02-05 21:28:26 +01:00
parent e5be1a6b76
commit 7fe4581c14
No known key found for this signature in database
GPG Key ID: 0D948CE19CF49C5F

View File

@ -27,6 +27,10 @@ config GLUON_VERSION
config GLUON_MINIFY config GLUON_MINIFY
bool "Minify Gluon scripts" bool "Minify Gluon scripts"
default y default y
config GLUON_BASE
bool "Exclude everything except the very most basic"
default n
endef endef
define Package/gluon-core/conffiles define Package/gluon-core/conffiles
@ -38,6 +42,10 @@ define Package/gluon-core/install
$(INSTALL_DIR) $(1)/lib/gluon $(INSTALL_DIR) $(1)/lib/gluon
echo '$(call qstrip,$(CONFIG_GLUON_VERSION))' > $(1)/lib/gluon/gluon-version echo '$(call qstrip,$(CONFIG_GLUON_VERSION))' > $(1)/lib/gluon/gluon-version
ifdef CONFIG_GLUON_BASE
find $(1)/lib/gluon/upgrade/ -type f -and ! -name "998-commit" -and ! -name "005-set-domain" -and ! -name "010-primary-mac" -and ! -name "030-system" -and ! -name "120-ntp-servers" -and ! -name "150-poe-passthrough" -and ! -name "300-firewall-rules" -and ! -name "820-dns-config" -and ! -name "999-version" -delete
endif
endef endef
$(eval $(call BuildPackageGluon,gluon-core)) $(eval $(call BuildPackageGluon,gluon-core))