Commit Graph

2 Commits

Author SHA1 Message Date
7d5610d21d Fix UUID extraction to handle commented fstab lines
Modified grep logic to extract UUIDs even if the fstab
lines are already commented out from a previous run.

Uses sed to strip comment prefixes before extracting UUIDs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 15:19:07 +07:00
4e46989ff6 Add complete USB auto-mount setup with cleanup
Created setup_usb_final.sh that handles all cleanup and setup
in one automated script to solve mount point conflicts.

Features:
- Stops and disables existing systemd mount units
- Unmounts any active USB mounts
- Extracts UUIDs from existing fstab entries
- Comments out fstab entries to prevent conflicts
- Creates timestamped fstab backup
- Creates systemd .mount and .automount units
- Enables and starts auto-mount
- Proper error handling and user feedback

This solves the "Path is already a mount point" error
that occurs when trying to set up systemd automount
while drives are already mounted via fstab.

Usage:
  sudo ./setup_usb_final.sh

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 15:15:37 +07:00