Open lmoellendorf opened 8 months ago
1) Format an USB thumb drive and set volume name:
mkfs.vfat -n data /dev/sda1
2) Add a line to your /etc/fstab containing the label as mount point, e.g.:
/etc/fstab
/dev/mmcblk0p3 /data auto defaults 0 2
3) Insert the thumb drive
Thumb drive should be mounted.
Thumb drive is ignored:
/dev/sda1 already in /etc/fstab, automount won't manage it: /dev/mmcblk0p3 /data auto defaults 0 2
In line 78 LABEL is used to find devices in fstab.
LABEL
If the regex is changed to not allow spaces before ${LABEL} it will ignore mount points:
${LABEL}
LABEL=data; grep /etc/fstab -e "^[^# ]*${LABEL}" LABEL=mmcblk0p3; grep /etc/fstab -e "^[^# ]*${LABEL}" /dev/mmcblk0p3 /data auto defaults 0 2
But I am not aware what possible values have to be matched in fstab.
Steps to reproduce
1) Format an USB thumb drive and set volume name:
2) Add a line to your
/etc/fstab
containing the label as mount point, e.g.:3) Insert the thumb drive
Expected result
Thumb drive should be mounted.
Actual result
Thumb drive is ignored:
Possible fix
In line 78
LABEL
is used to find devices in fstab.If the regex is changed to not allow spaces before
${LABEL}
it will ignore mount points:But I am not aware what possible values have to be matched in fstab.