Skip to content

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

Merged
abeltrano merged 1 commit into
developfrom
hapdxtraargs
Jan 18, 2024
Merged

Fix xtra args positioning for hostapd systemd service unit file (again)#111
abeltrano merged 1 commit into
developfrom
hapdxtraargs

Conversation

@abeltrano
Copy link
Copy Markdown
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
● hostapd@wlx08beac0696fe.service - Hostapd Daemon
     Loaded: loaded (/etc/systemd/system/hostapd@.service; 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/hostapd@wlx08beac0696fe.service
             └─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 hostapd@wlx08beac0696fe.service - 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
@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