mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-10-01 08:25:45 -04:00
output
This commit is contained in:
parent
7aa7d0b5a0
commit
66aaf3e22c
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user