From 4388fc4d5ace9046c9eacb8354d9960599735ee4 Mon Sep 17 00:00:00 2001 From: Patrick Schleizer Date: Sat, 21 Dec 2019 05:11:19 -0500 Subject: [PATCH] refactoring --- usr/lib/security-misc/remount-secure | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr/lib/security-misc/remount-secure b/usr/lib/security-misc/remount-secure index 86fabf4..8da041d 100755 --- a/usr/lib/security-misc/remount-secure +++ b/usr/lib/security-misc/remount-secure @@ -55,7 +55,9 @@ remount_secure() { ## example mount_folder: ## /home - if echo "$mount_output" | grep "$mount_folder" | grep -q "$new_mount_options" ; then + mount_line_of_mount_folder="$(echo "$mount_output" | grep "$mount_folder")" + + if echo "$mount_line_of_mount_folder" | grep -q "$new_mount_options" ; then echo "INFO: $mount_folder has already intended mount options." return 0 fi