use findmnt

This commit is contained in:
Patrick Schleizer 2023-10-22 10:22:21 -04:00
parent 1120d0652d
commit d5cb7ecec9
No known key found for this signature in database
GPG Key ID: CB8D50BB77BB3C48
2 changed files with 3 additions and 1 deletions

View File

@ -79,7 +79,7 @@ remount_secure() {
## example status_file_full_path:
## /run/remount-secure/_home
mount_line_of_mount_folder="$(echo "$mount_output" | grep "$mount_folder ")" || true
mount_line_of_mount_folder="$(findmnt --noheadings "$mount_folder")" || true
if echo "$mount_line_of_mount_folder" | grep --quiet "$new_mount_options" ; then
$output_command "INFO: $mount_folder has already intended mount options. ($new_mount_options)"

View File

@ -5,6 +5,7 @@
# called by dracut
check() {
require_binaries findmnt || return 1
require_binaries touch || return 1
require_binaries grep || return 1
require_binaries id || return 1
@ -20,6 +21,7 @@ depends() {
# called by dracut
install() {
inst_multiple findmnt
inst_multiple touch
inst_multiple grep
inst_multiple id