+1 I think in every uci config file every section should be enbled/disabled by a simply boolean switch with enabled as default value
2011/11/19 Michael Heimpold <[email protected]>: > Since various packages implement such a function already on their own, > it seems reasonable to provide this a globally available function. > > Signed-off-by: Michael Heimpold <[email protected]> > > Index: package/base-files/files/lib/functions.sh > =================================================================== > --- package/base-files/files/lib/functions.sh (revision 29234) > +++ package/base-files/files/lib/functions.sh (working copy) > @@ -205,6 +205,12 @@ > done > } > > +section_enabled() { > + local enabled > + config_get_bool enabled "$1" 'enabled' 0 > + [ $enabled -gt 0 ] || return 1 > +} > + > load_modules() { > [ -d /etc/modules.d ] && { > cd /etc/modules.d > > _______________________________________________ > openwrt-devel mailing list > [email protected] > https://lists.openwrt.org/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
