mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-12-23 01:03:35 +07:00
refactoring
This commit is contained in:
parent
d5cb7ecec9
commit
ef69e512bd
@ -79,9 +79,11 @@ remount_secure() {
|
||||
## example status_file_full_path:
|
||||
## /run/remount-secure/_home
|
||||
|
||||
mount_line_of_mount_folder="$(findmnt --noheadings "$mount_folder")" || true
|
||||
old_mount_options="$(findmnt --noheadings --output options -- "$mount_folder")" || true
|
||||
## example old_mount_options:
|
||||
## rw,nosuid,nodev,relatime,discard
|
||||
|
||||
if echo "$mount_line_of_mount_folder" | grep --quiet "$new_mount_options" ; then
|
||||
if echo "$old_mount_options" | grep --quiet "$new_mount_options" ; then
|
||||
$output_command "INFO: $mount_folder has already intended mount options. ($new_mount_options)"
|
||||
return 0
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user