Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
functions.sh: be more precise while reading /proc/mount
The /proc/mount file is a space-separated table of all devices mounted. The current implementation only greps for a matching pattern without taking this into account. This may cause a misreading of /proc/mount when, say, the ESP was mounted at /efi (AOSC OS default). For instance: ``` $ grep /efi /proc/mounts efivarfs /sys/firmware/efi/efivars efivarfs rw,nosuid,nodev,noexec,relatime 0 0 systemd-1 /efi autofs rw,relatime,fd=50,pgrp=1,timeout=120,minproto=5,maxproto=5,direct,pipe_ino=21868 0 0 ``` Also match the spaces on either end of the mount path to avoid this issue. Signed-off-by: Mingcong Bai <[email protected]>
- Loading branch information