Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix xtra args positioning for hostapd systemd service unit file (again) #111

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

abeltrano
Copy link
Contributor

Type

  • Bug fix
  • Feature addition
  • Feature update
  • Documentation
  • Build Infrastructure

Side Effects

  • Breaking change
  • Non-functional change

Goals

  • Ensure hostapd can be controlled via systemd whether extra arguments are provided or not.

Technical Details

  • hostapd is picky and expects the configuration file argument to come directly after the -i flag, so any extra arguments must be positioned prior to this flag. So, move ${HOSTAPD_XTRA_ARGS} to be the first argument for hostapd.

Test Results

  • Ran sudo systemctl start hostapd@wlx08beac0696fe on a Linux machine and ensured the hostapd service came up:
shadowfax@mrstux:/etc/systemd/system$ sudo systemctl status hostapd@wlx08beac0696fe
● [email protected] - Hostapd Daemon
     Loaded: loaded (/etc/systemd/system/[email protected]; disabled; preset: enabled)
     Active: active (running) since Thu 2024-01-18 17:17:29 UTC; 5min ago
   Main PID: 24752 (hostapd)
      Tasks: 1 (limit: 18968)
     Memory: 1.0M
        CPU: 1.371s
     CGroup: /system.slice/system-hostapd.slice/[email protected]
             └─24752 /home/shadowfax/src/microsoft/netremote-cmake/out/install/dev-linux/sbin/hostapd -i wlx08beac0696fe /etc/hostapd/hostapd-wlx08beac0696fe.conf

Jan 18 17:17:29 mrstux systemd[1]: Started [email protected] - Hostapd Daemon.
Jan 18 17:17:30 mrstux hostapd[24752]: wlx08beac0696fe: interface state UNINITIALIZED->ENABLED
Jan 18 17:17:30 mrstux hostapd[24752]: wlx08beac0696fe: AP-ENABLED

Reviewer Focus

  • None

Future Work

  • None

Checklist

  • Build target all compiles cleanly.
  • clang-format and clang-tidy deltas produced no new output.
  • Newly added functions include doxygen-style comment block.

@abeltrano abeltrano requested a review from a team as a code owner January 18, 2024 17:29
@abeltrano abeltrano merged commit fc429c1 into develop Jan 18, 2024
4 checks passed
@abeltrano abeltrano deleted the hapdxtraargs branch January 18, 2024 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant