File tree 1 file changed +17
-1
lines changed 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -74,11 +74,27 @@ def _get_host_hostname(self) -> str:
74
74
def _get_legacy (self ) -> bool :
75
75
return self .legacy
76
76
77
+ def _key_is_mac_config (self , key : str , explicit : bool = False ) -> bool :
78
+ fragments = key .rsplit ("_" , maxsplit = 1 )
79
+ if len (fragments ) < 2 :
80
+ return False
81
+ elif fragments [1 ].lower () != "mac" :
82
+ return False
83
+ elif explicit is False :
84
+ # do not explicitly check if the interface exists
85
+ return True
86
+ return (fragments [0 ] in self ["interfaces" ].keys ()) is True
87
+
77
88
def _is_known_property (self , key : str ) -> bool :
78
89
key_is_default = key in self .host .defaults .config .keys ()
79
90
key_is_setter = f"_set_{ key } " in dict .__dir__ (self )
80
91
key_is_special = key in iocage .Config .Jail .Properties .properties
81
- return (key_is_default or key_is_setter or key_is_special ) is True
92
+ return any ([
93
+ key_is_default ,
94
+ key_is_setter ,
95
+ key_is_special ,
96
+ self ._key_is_mac_config (key )
97
+ ]) is True
82
98
83
99
def __setitem__ (
84
100
self ,
You can’t perform that action at this time.
0 commit comments