Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3db774e

Browse files
committedOct 14, 2022
Rename Chef option ipv6only to enable_ipv4
1 parent ffe27c4 commit 3db774e

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed
 

‎examples/chef/chef.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ def main() -> int:
345345
parser.add_option(
346346
"", "--ci", help="Builds Chef examples defined in cicd_config. Uses --use_zzz. Uses specified target from -t. Chef exits after completion.", dest="ci", action="store_true")
347347
parser.add_option(
348-
"", "--ipv6only", help="Disable IPv4. Applicable to platforms that can support IPV4 (e.g, Linux, ESP32)",
348+
"", "--enable_ipv4", help="Enable IPv4 mDNS. Only applicable to platforms that can support IPV4 (e.g, Linux, ESP32)",
349349
action="store_true", default=False)
350350
parser.add_option(
351351
"", "--cpu_type", help="CPU type to compile for. Linux only.", choices=["arm64", "arm", "x64"])
@@ -658,12 +658,12 @@ def main() -> int:
658658

659659
if options.build_target == "esp32":
660660
shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/esp32")
661-
if options.ipv6only:
661+
if options.enable_ipv4:
662662
shell.run_cmd(
663-
f"sed -i 's/#\\ CONFIG_DISABLE_IPV4\\ is\\ not\\ set/CONFIG_DISABLE_IPV4=y/g' sdkconfig ")
663+
f"sed -i 's/CONFIG_DISABLE_IPV4=y/#\\ CONFIG_DISABLE_IPV4\\ is\\ not\\ set/g' sdkconfig ")
664664
else:
665665
shell.run_cmd(
666-
f"sed -i 's/CONFIG_DISABLE_IPV4=y/#\\ CONFIG_DISABLE_IPV4\\ is\\ not\\ set/g' sdkconfig ")
666+
f"sed -i 's/#\\ CONFIG_DISABLE_IPV4\\ is\\ not\\ set/CONFIG_DISABLE_IPV4=y/g' sdkconfig ")
667667
shell.run_cmd("idf.py build")
668668
shell.run_cmd("idf.py build flashing_script")
669669
shell.run_cmd(
@@ -781,7 +781,9 @@ def main() -> int:
781781
flush_print(
782782
f"Unable to cross compile for x64 on {uname_resp}")
783783
exit(1)
784-
if options.ipv6only:
784+
if options.enable_ipv4:
785+
linux_args.append("chip_inet_config_enable_ipv4=true")
786+
else:
785787
linux_args.append("chip_inet_config_enable_ipv4=false")
786788

787789
if sw_ver_string:

0 commit comments

Comments
 (0)
Please sign in to comment.