From 7636637b36a55a8add54ddb72d172b09d428453e Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 9 Jul 2013 12:01:06 -0300 Subject: Error checking aroung ecryptfs-home --- share/hydractl/ecryptfs-home | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- cgit v1.2.3