lisaac / luci-app-diskman

Disk Manager for LuCI
GNU Affero General Public License v3.0
400 stars 112 forks source link

Config option not displayed when luci-app-diskman isn't selected #48

Closed acooler15 closed 3 years ago

acooler15 commented 3 years ago

PACKAGE_$(PKG_NAME)_INCLUDE_btrfs_progsPACKAGE_$(PKG_NAME)_INCLUDE_lsblkPACKAGE_$(PKG_NAME)_INCLUDE_mdadm添加depends on PACKAGE_$(PKG_NAME),当luci-app-diskman没有选中时,不显示这几项。

acooler15 commented 3 years ago

还有一种方式可以达到这种效果:

define Package/$(PKG_NAME)/config
if PACKAGE_$(PKG_NAME)
config PACKAGE_$(PKG_NAME)_INCLUDE_btrfs_progs
    bool "Include btrfs-progs"
    default y
config PACKAGE_$(PKG_NAME)_INCLUDE_lsblk
    bool "Include lsblk"
    default y
config PACKAGE_$(PKG_NAME)_INCLUDE_mdadm
    bool "Include mdadm"
    default n
config PACKAGE_$(PKG_NAME)_INCLUDE_kmod_md_raid456
    depends on PACKAGE_$(PKG_NAME)_INCLUDE_mdadm
    bool "Include kmod-md-raid456"
    default n
config PACKAGE_$(PKG_NAME)_INCLUDE_kmod_md_linear
    depends on PACKAGE_$(PKG_NAME)_INCLUDE_mdadm
    bool "Include kmod-md-linear"
    default n

endif
endef