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

Connect wizard #23

Merged
merged 31 commits into from
Mar 20, 2024
Merged

Connect wizard #23

merged 31 commits into from
Mar 20, 2024

Conversation

mxwt00
Copy link
Collaborator

@mxwt00 mxwt00 commented Jan 17, 2024

Implemented connect wizard and clean command

Daniel and i thought about a different usage of the connect wizard:
The connect wizard no longer requires the usage of separate connect and disconnect commands.
Instead, the connect wizard is integrated in all other commands and automatically executed when no device is specified.

The connect wizard needs sudo rights because of the mounting.
We changed the mount location to /var/lib/hydrophonitor/device that the root user home directory doesn't get used.

Signed-off-by: Max Winter <maxwinter00@gmail.com>
Signed-off-by: Max Winter <maxwinter00@gmail.com>
Signed-off-by: Max Winter <maxwinter00@gmail.com>
Signed-off-by: Max Winter <maxwinter00@gmail.com>
Signed-off-by: Max Winter <maxwinter00@gmail.com>
Signed-off-by: Max Winter <maxwinter00@gmail.com>
Signed-off-by: Max Winter <maxwinter00@gmail.com>
Signed-off-by: Max Winter <maxwinter00@gmail.com>
Signed-off-by: Max Winter <maxwinter00@gmail.com>
Signed-off-by: Max Winter <maxwinter00@gmail.com>
Signed-off-by: Max Winter <maxwinter00@gmail.com>
Signed-off-by: Max Winter <maxwinter00@gmail.com>
Signed-off-by: Max Winter <maxwinter00@gmail.com>
Signed-off-by: Max Winter <maxwinter00@gmail.com>
…put; changed error handling to use anyhow instead of error messages
…ct and disconnect commands unnecessary. Device is automatically unmounted after the program exits
@juliuskoskela
Copy link
Contributor

Great work, thank you guys! We will review asap.

lib/src/connect.rs Outdated Show resolved Hide resolved
cli/src/connect.rs Outdated Show resolved Hide resolved
cli/src/clean.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@satukoskinen satukoskinen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested the connect + device functionality and to me it looks like it's working well! I put a few small comments that can be fixed later on.

Some ideas for identifying the correct device:

  • We could try to think of some way to restrict the provided manually listed devices to USB storage devices. For example udevadm info <device/path> provides more information about each device.
  • Alternative or additional way to verify that the device is indeed the hydrophonitor device (and its correct partition) udevadm info <device/path> can be used to check whether ID_FS_LABEL=NIXOS_SD is set

@juliuskoskela
Copy link
Contributor

Changes approved, could developer please squash and merge the commits. Include necessary descriptions and commit messages in squashed commit (Github will give a template).

@mxwt00 mxwt00 merged commit 8c7f36c into main Mar 20, 2024
1 check passed
@mxwt00 mxwt00 deleted the connect_wizard branch March 20, 2024 09:23
@mxwt00 mxwt00 restored the connect_wizard branch March 20, 2024 13:59
@mxwt00 mxwt00 deleted the connect_wizard branch March 20, 2024 13:59
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.

None yet

4 participants