aboutsummaryrefslogtreecommitdiff
path: root/share/hydractl/ecryptfs-home
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-07-09 12:01:06 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-07-09 12:01:06 -0300
commit7636637b36a55a8add54ddb72d172b09d428453e (patch)
tree012917946939ca05298767d47095ea82a41f9b2b /share/hydractl/ecryptfs-home
parent12908bf27f5d70f496f31452a5fa3de32fceb31d (diff)
downloadhydra-7636637b36a55a8add54ddb72d172b09d428453e.tar.gz
hydra-7636637b36a55a8add54ddb72d172b09d428453e.tar.bz2
Error checking aroung ecryptfs-home
Diffstat (limited to 'share/hydractl/ecryptfs-home')
-rwxr-xr-xshare/hydractl/ecryptfs-home8
1 files changed, 8 insertions, 0 deletions
diff --git a/share/hydractl/ecryptfs-home b/share/hydractl/ecryptfs-home
index 73598a5..2719d7b 100755
--- a/share/hydractl/ecryptfs-home
+++ b/share/hydractl/ecryptfs-home
@@ -48,6 +48,8 @@ Please make sure you have backups of anything important on
/home/$USER and /mnt/crypt/home/$USER as these folders will
be overwritten.
+Also, please make sure $USER is not logged in.
+
Use this script AT YOUR OWN RISK.
Press any key to continue, or ^C to abort.
@@ -62,6 +64,12 @@ hydra_install_package ecryptfs-utils
$sudo modprobe ecryptfs
$sudo ecryptfs-migrate-home -u $USER
+# Check result
+if [ "$?" != "0" ]; then
+ echo "Error migrating $USER's folder"
+ exit 1
+fi
+
# Remove user folder
#rm -rf /home/$USER.*
rm -rf /mnt/crypt/home/$USER