mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-07-14 01:42:01 +07:00
output
This commit is contained in:
@ -50,9 +50,6 @@ remount_secure() {
|
|||||||
## example status_file_full_path:
|
## example status_file_full_path:
|
||||||
## /var/run/remount-secure/_home
|
## /var/run/remount-secure/_home
|
||||||
|
|
||||||
if [ -e "$status_file_full_path" ]; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
## str_replace is provided by package helper-scripts.
|
## str_replace is provided by package helper-scripts.
|
||||||
mount_folder="$(echo "${status_file_name}" | str_replace "_" "/")"
|
mount_folder="$(echo "${status_file_name}" | str_replace "_" "/")"
|
||||||
## example mount_folder:
|
## example mount_folder:
|
||||||
@ -65,11 +62,18 @@ remount_secure() {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
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
|
if echo "$mount_output" | grep -q "$mount_folder " ; then
|
||||||
## Already mounted. Using remount.
|
## Already mounted. Using remount.
|
||||||
|
echo mount -o "remount,${new_mount_options}" "$mount_folder"
|
||||||
mount -o "remount,${new_mount_options}" "$mount_folder" || exit_code=100
|
mount -o "remount,${new_mount_options}" "$mount_folder" || exit_code=100
|
||||||
else
|
else
|
||||||
## Not yet mounted. Using mount bind.
|
## 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
|
mount -o "$new_mount_options" --bind "$mount_folder" "$mount_folder" || exit_code=101
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user