From 66aaf3e22cda9bb58ab72e750a5711556cf1de25 Mon Sep 17 00:00:00 2001 From: Patrick Schleizer Date: Sat, 21 Dec 2019 05:25:54 -0500 Subject: [PATCH] output --- usr/lib/security-misc/remount-secure | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/usr/lib/security-misc/remount-secure b/usr/lib/security-misc/remount-secure index 24b3308..a491b2e 100755 --- a/usr/lib/security-misc/remount-secure +++ b/usr/lib/security-misc/remount-secure @@ -50,9 +50,6 @@ remount_secure() { ## example status_file_full_path: ## /var/run/remount-secure/_home - if [ -e "$status_file_full_path" ]; then - return 0 - fi ## str_replace is provided by package helper-scripts. mount_folder="$(echo "${status_file_name}" | str_replace "_" "/")" ## example mount_folder: @@ -65,11 +62,18 @@ remount_secure() { return 0 fi + if [ -e "$status_file_full_path" ]; then + echo "INFO: Already remounted $mount_folder earlier. Not remounting again." + return 0 + fi + if echo "$mount_output" | grep -q "$mount_folder " ; then ## Already mounted. Using remount. + echo mount -o "remount,${new_mount_options}" "$mount_folder" mount -o "remount,${new_mount_options}" "$mount_folder" || exit_code=100 else ## Not yet mounted. Using mount bind. + echo mount -o "$new_mount_options" --bind "$mount_folder" "$mount_folder" mount -o "$new_mount_options" --bind "$mount_folder" "$mount_folder" || exit_code=101 fi