screen lock fix
[distro-setup] / switch-mail-host
index 651c96ecc3a92d00e37cd50fc189d8a735e75db6..ffff83e264dbce8b7e1034d85aea10a055711712 100644 (file)
@@ -57,7 +57,7 @@ fi
 mail_only=false
 host2_only=false
 force=false
-mp_args="-m /o,/q,/a"
+mp_args="-m /o,/a,/ar,/q,/qr"
 temp=$(getopt -l force,help ioh "$@") || usage 1
 eval set -- "$temp"
 while true; do
@@ -241,8 +241,8 @@ EOF
 
 
 e Running initial btrbk
-if ! m btrbk-run -v $bbk_args $incremental_arg $mp_args; then
-  ret=$?
+m btrbk-run -v $bbk_args $incremental_arg $mp_args || ret=$?
+if (( ret )); then
   err "failed initial btrbk"
   exit $ret
 fi
@@ -260,8 +260,8 @@ if $host2_only; then
   exit 0
 fi
 
-if ! m $old_shell /a/exe/primary-setup $new_hostname; then
-  ret=$?
+m $old_shell /a/exe/primary-setup $new_hostname || ret=$?
+if (( ret )); then
   err "failed \$old_shell primary-setup \$new_hostname. fix and rerun $script_name"
   exit $ret
 fi
@@ -291,8 +291,8 @@ echo
 #
 # shopt -s nullglob; find . -type f -mtime -2 | while read -r f; do a=( /m/4e/Sent/cur/${f%,*}* ); if (( ${#a[@]} )); then e exists $a; else m cp -a $f /m/4e/Sent/cur; fi; done
 
-if ! m $new_shell /a/exe/primary-setup localhost; then
-  ret=$?
+m $new_shell /a/exe/primary-setup localhost || ret=$?
+if (( ret )); then
   err "failed final primary-setup, just fix and rerun: $new_shell /a/exe/primary-setup localhost"
   exit $ret
 fi