From 5185fff59a6985579d589b84ee3bc1c8aa318f39 Mon Sep 17 00:00:00 2001 From: samson Date: Thu, 6 Dec 2018 14:03:05 +0800 Subject: [PATCH] Fix bug --- bin/hardening/2.2_tmp_nodev.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/hardening/2.2_tmp_nodev.sh b/bin/hardening/2.2_tmp_nodev.sh index 4037667..1c0a6e5 100755 --- a/bin/hardening/2.2_tmp_nodev.sh +++ b/bin/hardening/2.2_tmp_nodev.sh @@ -65,7 +65,12 @@ apply () { info "Adding $OPTION to fstab" add_option_to_fstab $PARTITION $OPTION info "Remounting $PARTITION from fstab" - remount_partition $PARTITION + is_mounted $PARTITION + if [ $FNRET = 1 ]; then + mount $PARTITION + else + remount_partition $PARTITION + fi elif [ $FNRET = 3 ]; then info "Remounting $PARTITION from systemd" add_option_to_systemd $SERVICEPATH $OPTION $SERVICENAME