Replace '[ -d "/home/$i/.ecryptfs" -o -L "/home/$i/.ecryptfs" ]' with '[ -d "/home/$i/.ecryptfs" ] || [ -L "/home/$i/.ecryptfs" ]' for portability. (Actually, do you even need to do both checks? -d returns true if given a symlink to a directory.)
Otherwise I think this is fine.
Replace '[ -d "/home/ $i/.ecryptfs" -o -L "/home/ $i/.ecryptfs" ]' with '[ -d "/home/ $i/.ecryptfs" ] || [ -L "/home/ $i/.ecryptfs" ]' for portability. (Actually, do you even need to do both checks? -d returns true if given a symlink to a directory.)
Otherwise I think this is fine.