Date: Wed, 1 Nov 2023 10:27:49 +0200 From: Panagiotis Atmatzidis <atma@convalesco.org> To: "freebsd-arm@freebsd.org" <freebsd-arm@FreeBSD.org> Subject: tailscaled init script doesn't create tun0 Message-ID: <2328529D-F25F-44D0-B78D-6CED15A2974B@convalesco.org>
next in thread | raw e-mail | index | archive | help
--Apple-Mail=_6E189B1B-A941-4A61-A334-5E7517DE59CD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hello, I installed =E2=80=9Ctailscale=E2=80=9D application as a binary package = in FreeBSD 13.2 running on RPi2. The architecture is arm7. When adding the the application to startup via `sysrc = tailscaled_enable=3D\=E2=80=9DYES\=E2=80=9D` the application hangs = because device tun0 is not being created. Once the device has been created manually, tailscaled will rename the = device to =E2=80=9Ctailscale0=E2=80=9D. The two existing flags =E2=80=9Ctailscaled_up_args=E2=80=9D and = =E2=80=9Ctailscaled_tun_dev=E2=80=9D cannot be used to create the = device. For the init to work as expected, I added these lines: ``` diff tailscaled /usr/local/etc/rc.d/tailscaled 67a68 > start_precmd=3D"${name}_prestart" 70a72,80 > > > tailscaled_prestart() > { > if [ ! -c /dev/tun ]; then > logger -s -t tailscale "Interface /dev/tun0 not found. = Creating /dev/tun0" > /sbin/ifconfig tun0 create > fi > } ``` I have no idea if this happens to other architectures and I=E2=80=99m = not sure if this should be handled by the init script or the application = itself. Kind regards, -- Panagiotis (atmosx) Atmatzidis email: atma@convalesco.org URL: http://www.convalesco.org GnuPG ID: 0x1A7BFEC5 gpg --keyserver pgp.mit.edu --recv-keys 1A7BFEC5 "Everyone thinks of changing the world, but no one thinks of changing = himself.=E2=80=9D - Leo Tolstoy --Apple-Mail=_6E189B1B-A941-4A61-A334-5E7517DE59CD Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; line-break: after-white-space;" = class=3D"">Hello,<div class=3D""><br class=3D""></div><div class=3D"">I = installed =E2=80=9Ctailscale=E2=80=9D application as a binary package in = FreeBSD 13.2 running on RPi2. The architecture is arm7.</div><div = class=3D""><br class=3D""></div><div class=3D"">When adding the the = application to startup via `sysrc tailscaled_enable=3D\=E2=80=9DYES\=E2=80= =9D` the application hangs because device tun0 is not being = created.</div><div class=3D"">Once the device has been created manually, = tailscaled will rename the device to =E2=80=9Ctailscale0=E2=80=9D.</div><d= iv class=3D""><br class=3D""></div><div class=3D"">The two existing = flags =E2=80=9Ctailscaled_up_args=E2=80=9D and =E2=80=9Ctailscaled_tun_dev= =E2=80=9D cannot be used to create the device.</div><div class=3D""><br = class=3D""></div><div class=3D"">For the init to work as expected, I = added these lines:</div><div class=3D""><br class=3D""></div><div = class=3D"">```</div><div class=3D""><div class=3D"">diff tailscaled = /usr/local/etc/rc.d/tailscaled</div><div class=3D"">67a68</div><div = class=3D"">> start_precmd=3D"${name}_prestart"</div><div = class=3D"">70a72,80</div><div class=3D"">></div><div = class=3D"">></div><div class=3D"">> = tailscaled_prestart()</div><div class=3D"">> {</div><div = class=3D"">> <span class=3D"Apple-tab-span" style=3D"white-space:pre"> = </span>if [ ! -c /dev/tun ]; then</div><div class=3D"">> <span = class=3D"Apple-tab-span" style=3D"white-space:pre"> = </span>logger -s -t tailscale "Interface /dev/tun0 not found. Creating = /dev/tun0"</div><div class=3D"">> <span class=3D"Apple-tab-span" = style=3D"white-space:pre"> </span>/sbin/ifconfig tun0 = create</div><div class=3D"">> <span class=3D"Apple-tab-span" = style=3D"white-space:pre"> </span>fi</div><div class=3D"">> = }</div></div><div class=3D"">```</div><div class=3D""><br = class=3D""></div><div class=3D"">I have no idea if this happens to other = architectures and I=E2=80=99m not sure if this should be handled by the = init script or the application itself.</div><div class=3D""><br = class=3D""></div><div class=3D""><br class=3D""></div><div class=3D"">Kind= regards,</div><div class=3D""><div class=3D""> <div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; text-align: = start; text-indent: 0px; text-transform: none; white-space: normal; = word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: = break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" = class=3D""><div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; = text-align: start; text-indent: 0px; text-transform: none; white-space: = normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: = break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" = class=3D""><div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; = text-align: start; text-indent: 0px; text-transform: none; white-space: = normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: = break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" = class=3D""><div style=3D"text-align: start; text-indent: 0px; word-wrap: = break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" = class=3D""><div style=3D"text-align: start; text-indent: 0px; word-wrap: = break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" = class=3D""><div style=3D"text-align: start; text-indent: 0px; word-wrap: = break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" = class=3D""><div style=3D"text-align: start; text-indent: 0px; word-wrap: = break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" = class=3D""><div style=3D"text-align: start; text-indent: 0px; word-wrap: = break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" = class=3D""><div style=3D"orphans: 2; text-align: -webkit-auto; = text-indent: 0px; widows: 2; word-wrap: break-word; -webkit-nbsp-mode: = space; line-break: after-white-space;" class=3D""><div style=3D"color: = rgb(0, 0, 0); font-family: Helvetica; font-style: normal; = font-variant-ligatures: normal; font-variant-position: normal; = font-variant-caps: normal; font-variant-numeric: normal; = font-variant-alternates: normal; font-variant-east-asian: normal; = font-weight: normal; letter-spacing: normal; line-height: normal; = text-transform: none; white-space: normal; word-spacing: 0px; = -webkit-text-stroke-width: 0px; orphans: 2; text-align: -webkit-auto; = text-indent: 0px; widows: 2; word-wrap: break-word; -webkit-nbsp-mode: = space; line-break: after-white-space;" class=3D""></div><br = class=3D"">--<br class=3D"">Panagiotis (atmosx) Atmatzidis<br = class=3D""><br class=3D"">email:<span class=3D"Apple-tab-span" = style=3D"color: rgb(0, 0, 0); font-family: Helvetica; font-style: = normal; font-variant-ligatures: normal; font-variant-position: normal; = font-variant-caps: normal; font-variant-numeric: normal; = font-variant-alternates: normal; font-variant-east-asian: normal; = font-weight: normal; letter-spacing: normal; line-height: normal; = text-transform: none; white-space: pre; word-spacing: 0px; = -webkit-text-stroke-width: 0px;"> </span><a = href=3D"mailto:atma@convalesco.org" class=3D"">atma@convalesco.org</a><br = class=3D"">URL:<span class=3D"Apple-tab-span" style=3D"color: rgb(0, 0, = 0); font-family: Helvetica; font-style: normal; font-variant-ligatures: = normal; font-variant-position: normal; font-variant-caps: normal; = font-variant-numeric: normal; font-variant-alternates: normal; = font-variant-east-asian: normal; font-weight: normal; letter-spacing: = normal; line-height: normal; text-transform: none; white-space: pre; = word-spacing: 0px; -webkit-text-stroke-width: 0px;"> = </span>http://www.convalesco.org<br class=3D"">GnuPG ID: 0x1A7BFEC5<br = class=3D"">gpg --keyserver pgp.mit.edu --recv-keys 1A7BFEC5<br = class=3D""><br class=3D""><div class=3D"">"Everyone thinks of changing = the world, but no one thinks of changing himself.=E2=80=9D - Leo = Tolstoy</div></div></div></div></div></div></div></div><br = class=3D"Apple-interchange-newline"></div><br = class=3D"Apple-interchange-newline"></div><br = class=3D"Apple-interchange-newline"><br = class=3D"Apple-interchange-newline"> </div> <br class=3D""></div></body></html>= --Apple-Mail=_6E189B1B-A941-4A61-A334-5E7517DE59CD--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2328529D-F25F-44D0-B78D-6CED15A2974B>