This function is needed to implement the id feature
described in #11405
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
return ${EXIT_FALSE}
}
+zone_config_id_is_valid() {
+ # This function checks if a given id is valid for a zone
+ # Return True when yes and false when no
+
+ assert [ $# -eq 2 ]
+ local zone=${1}
+ local id=${2}
+
+ local zone_path=$(zone_dir ${zone})
+
+ [ -f ${zone_path}/configs/*.${id} ];
+}
+
zone_has_ip() {
device_has_ip $@
}