]> gitweb.fluxo.info Git - hydra.git/commitdiff
Error checking aroung ecryptfs-home
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 9 Jul 2013 15:01:06 +0000 (12:01 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 9 Jul 2013 15:01:06 +0000 (12:01 -0300)
share/hydractl/ecryptfs-home

index 73598a5d0f772921031a17e67cce2e9939b438ef..2719d7bc7e28eeb5cfa68c1082e737a99fb184d0 100755 (executable)
@@ -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