Fix fatal syntax error and complete the setup flow - #1
Open
TheRealBrofessor wants to merge 2 commits into
Open
Conversation
pylon.sh on main does not run at all: a duplicate `toggle)` block was left dangling after `main "$@"`, so bash aborts with a syntax error before any command executes. The `toggle` command is already wired to tx_toggle() in the case statement, so the trailing block was dead code. Removed it; the script now parses and runs. Also completes setup() so it matches what the README promises: - install_self(): copies pylon.sh to /usr/local/bin (README documents running it from there, but nothing ever installed it) - write_modprobe_conf(): writes a max-throughput /etc/modprobe.d/8814au.conf (USB 3.0 + power-save off) and hot-reloads the driver - setup() no longer hard-fails when the adapter is absent: deps, driver profile, and self-install run first; the udev rename is skipped with a clear message if the device is not yet on USB Adds pylon-bootstrap.sh: one command that recovers a wedged xHCI port, runs setup, waits for the interface, brings it up, and audits. Never touches internal wifi. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
USB 3.0 SuperSpeed negotiation is the exact step that fails with error -71 on flaky ports/cables. write_modprobe_conf now verifies the adapter re-enumerates after the driver reload; if the interface does not return within 15s, it comments the USB3 line, uncomments the USB2 fallback, and reloads again — so setup never leaves a previously-working adapter dead. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
main’s
pylon.shdoes not run at all — a duplicatetoggle)block was left dangling aftermain "$@", so bash aborts withsyntax error near unexpected token )before any command executes.toggleis already wired totx_toggle()in the case statement, so that trailing block was dead code. Removing it makes the script parse and run.Changes
pylon.shtoggle)block aftermain "$@"(the actual syntax error).install_self()—setupnow copies the script to/usr/local/bin/pylon.sh. The README tells users to run it from there, but nothing ever installed it.write_modprobe_conf()—setupwrites a max-throughput/etc/modprobe.d/8814au.conf(USB 3.0 SuperSpeed + power-save off) for the AWUS1900/RTL8814AU and hot-reloads the module. Falls back to USB 2.0 mode via a commented line for adapters that fail to enumerate on USB 3.setupwhen the adapter is absent — deps, driver profile, and self-install run first; the udev rename step is skipped with a clear message instead of hard-exiting, so a first run before plugging in still provisions the host.pylon-bootstrap.sh(new)setup, waits for the interface, brings it up, and prints an audit. Never touches internal/PCIe wifi.Test
bash -n pylon.sh→ clean (was a hard syntax error onmain).bash pylon.shwith no args prints usage instead of aborting.🤖 Generated with Claude Code