refactoring

This commit is contained in:
Patrick Schleizer 2019-12-21 05:18:34 -05:00
parent 29cd9a0c38
commit cf5dee64fd
No known key found for this signature in database
GPG Key ID: CB8D50BB77BB3C48

View File

@ -46,8 +46,11 @@ remount_secure() {
status_file_name="${FUNCNAME[1]}" status_file_name="${FUNCNAME[1]}"
## example status_file_name: ## example status_file_name:
## _home ## _home
status_file_full_path="/var/run/remount-secure/${status_file_name}"
## example status_file_full_path:
## /var/run/remount-secure/_home
if [ -e "/var/run/remount-secure/${status_file_name}" ]; then if [ -e "$status_file_full_path" ]; then
return 0 return 0
fi fi
## str_replace is provided by package helper-scripts. ## str_replace is provided by package helper-scripts.
@ -70,7 +73,7 @@ remount_secure() {
mount -o "$new_mount_options" --bind "$mount_folder" "$mount_folder" mount -o "$new_mount_options" --bind "$mount_folder" "$mount_folder"
fi fi
touch "/var/run/remount-secure/${status_file_name}" touch "$status_file_full_path"
} }
_home() { _home() {