From f1da0ce7461fab2eeb421daa886ddd9856c9fd52 Mon Sep 17 00:00:00 2001 From: Patrick Schleizer Date: Sun, 22 Oct 2023 11:11:10 -0400 Subject: [PATCH] fix --- usr/bin/remount-secure | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/usr/bin/remount-secure b/usr/bin/remount-secure index d1f0569..5c842ad 100755 --- a/usr/bin/remount-secure +++ b/usr/bin/remount-secure @@ -24,14 +24,14 @@ init() { $output_command "ERROR: must be run as root! sudo $0" exit 1 fi + $output_command "START" mkdir --parents "/run/remount-secure" exit_code=0 - mount_output="$(mount)" ## Debugging. - $output_command "INFO: mount_output:" - $output_command "$mount_output" + $output_command "INFO: 'findmnt --list' output at the START." + $output_command "$(findmnt --list)" $output_command "" } @@ -103,7 +103,7 @@ remount_secure() { fi fi - if findmnt --noheadings "$mount_folder " >/dev/null ; then + if findmnt --noheadings "$mount_folder" >/dev/null ; then $output_command "INFO: '$mount_folder' already mounted, therefore using remount." $output_command INFO: Executing: mount --options "remount,${intended_mount_options}" "$mount_folder" mount --options "remount,${intended_mount_options}" "$mount_folder" || exit_code=100 @@ -153,6 +153,9 @@ _home() { } end() { + ## Debugging. + $output_command "INFO: 'findmnt --list' output at the END." + $output_command "$(findmnt --list)" exit $exit_code }