add error detection to cpw in create-user
authormegacz <megacz>
Tue, 1 May 2007 02:58:08 +0000 (02:58 +0000)
committermegacz <megacz>
Tue, 1 May 2007 02:58:08 +0000 (02:58 +0000)
create-user

index d5f5a11..2c4e33a 100755 (executable)
@@ -215,6 +215,11 @@ fs checkvolumes
 #
 # Finally, set password for main user's principal
 # Aborting this operation is harmless. Just re-invoke cpw.
+#
+# kadmin.local doesn't report errors properly, so we have to
+# check manually
 # 
-sudo kadmin.local -p root/admin -q "cpw $USER@HCOOP.NET"
+sudo kadmin.local -p root/admin -q "cpw $USER@HCOOP.NET" \
+  2>&1 | grep 'Password for .* changed' || \
+  (echo "*** kadmin.local -q cpw failed!"; exit -1)