Major improvements to drive detection and create-all command

Drive Detection Improvements:
- Enhanced discover_mounts() with verbose mode showing detailed disk info
- Better filtering to skip loopback devices and empty entries
- Extended SHARES array format to include device name and UUID (5 fields)
- Shows mount status, disk size, and free space for each partition

create-all Command Overhaul:
- Now a comprehensive 4-step setup process:
  1. Creates static shares (home + root)
  2. Detects all disk partitions on the system
  3. Automatically mounts unmounted disks to /mnt/<label>
  4. Adds disks to /etc/fstab for persistent mounting
  5. Creates Samba shares for all mounted disks
- Perfect for initial setup or bulk disk management

Other Improvements:
- discover command now shows verbose output with mount status
- auto-disks shows count of created shares
- Updated all functions to handle new 5-field SHARES format
- Better error handling and user feedback throughout

This makes FSA truly zero-touch for multi-disk setups!

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
mxnticek 2026-01-09 20:54:22 +01:00
parent 74c2dd0daf
commit 68ea576205
2 changed files with 151 additions and 16 deletions

View file

@ -59,6 +59,7 @@ sudo ./spravuj_sdileni.sh mount-share --mode=always
```bash
sudo ./spravuj_sdileni.sh discover
```
Shows all detected disk partitions with their mount status, labels, and available space.
**List configured shares**:
```bash
@ -156,10 +157,18 @@ Default allowed networks:
sudo ./spravuj_sdileni.sh add-global
```
### Create all static shares (home + root)
### Create all shares automatically
```bash
sudo ./spravuj_sdileni.sh create-all
```
This comprehensive command will:
1. Create static shares (home directory and root filesystem)
2. Detect all disk partitions on the system
3. Automatically mount any unmounted disks to `/mnt/<disk-label>`
4. Add unmounted disks to `/etc/fstab` for persistence across reboots
5. Create Samba shares for all mounted disks
Perfect for initial setup or adding multiple disks at once!
## Troubleshooting