talos-bootstrap
talos-bootstrap copied to clipboard
Issues running on MacOS
Getting the error when running talos-bootstrap install. On MacOS 13.6.6 talosctl version v1.6.7
❯ talos-bootstrap install
/usr/local/bin/talos-bootstrap: line 126: syntax error near unexpected token `;;'
/usr/local/bin/talos-bootstrap: line 126: ` case " ${seen} " in *" ${mac} "*) continue ;; esac # remove duplicated nodes'
Hi @insuusvenerati could you please provide output of:
/bin/sh --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin22)
Copyright (C) 2007 Free Software Foundation, Inc.
It seems case statement does not work inside subshell $() for some reason.
Please try this version from #12 https://github.com/aenix-io/talos-bootstrap/raw/8f3f1985a8b84b535d7ed01014d0f25bab13400b/talos-bootstrap
Hey! That's works! Thanks so much
Is there any chance you can get this to work on macOS? Mac doesn't have an iproute2 package so instead I used iproute2mac but get this error
❯ ./talos-bootstrap install
Option "-o" is unknown, try "ip help".
awk: extra ] at source line 1
context is
NR>1 >>> {sub(/^[^/] <<<
awk: nonterminated character class ^[^
source line number 1
awk: illegal primary in regular expression *"$ at "$
source line number 1
context is
>>> /*"$/ <<<
Try installing awk
https://formulae.brew.sh/formula/awk
Try installing awk
https://formulae.brew.sh/formula/awk
Same happens with the latest version of awk installed
awk: extra ] at source line 1
context is
NR>1 >>> {sub(/^[^/] <<<
awk: nonterminated character class ^[^
source line number 1
awk: illegal primary in regular expression *"$ at "$
source line number 1
context is
>>> /*"$/ <<<
```
Sorry to necro this but as a resolution, it appears that some of the awk syntax used by talos-bootstrap includes GNU extensions that require using gawk
try brew install gawk and
do one of 2 things:
- symlink awk against gawk or
- replace all instances of awk with gawk in talos-boostrap using
sed -i.bak 's/awk/gawk/' talos-bootstrap
I came to this conclusion after a bit of blue/green testing between my daily driver MBP and a clean Ubuntu VM install. in the clean install /usr/bin/awk links to /etc/alternatives/awk and /etc/alternatives/awk links back to /usr/bin/gawk thus explaining the difference in behaviour