mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-01-27 17:37:17 +01:00
Added dependency based on directory
This commit is contained in:
parent
7cce094e03
commit
cb405b3b88
1 changed files with 4 additions and 0 deletions
|
|
@ -330,6 +330,7 @@ static bool check_dependency(const char *conf_obj)
|
|||
/* multiple ubus => "ubus:system->info,dsl->status,wifi" */
|
||||
/* one package => "opkg:icwmp" */
|
||||
/* multiple packages => "opkg:icwmp,obuspa" */
|
||||
/* directory => "dir:/sys/class/ieee80211/" */
|
||||
/* common (files, ubus and opkg) => "file:/etc/config/network,/etc/config/dhcp;ubus:system,dsl->status;opkg:icwmp" */
|
||||
|
||||
char *pch = NULL, *spch = NULL;
|
||||
|
|
@ -351,6 +352,9 @@ static bool check_dependency(const char *conf_obj)
|
|||
if (!strcmp(pch, "file") && !file_exists(token))
|
||||
return false;
|
||||
|
||||
if (!strcmp(pch, "dir") && !bbfdm_folder_exists(token))
|
||||
return false;
|
||||
|
||||
if (!strcmp(pch, "ubus") && !dmubus_object_method_exists(token))
|
||||
return false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue