X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=btrbk-run;h=0cdc6256294d97a6fe6e4228f216975b961785dc;hb=8de1e14e35d0ad62620a59f6e2ca4ba19ddcda3c;hp=9bd6e9b6f62b3628d68648350c657c021d56d9b6;hpb=b714b0dde29aaf5e44d628c1d723077465e9c488;p=distro-setup diff --git a/btrbk-run b/btrbk-run index 9bd6e9b..0cdc625 100644 --- a/btrbk-run +++ b/btrbk-run @@ -103,7 +103,7 @@ set-location() { at_home=true ;; x2|x3|sy|so) - if [[ $(dig +short @10.2.0.1 -x 10.2.0.2 2>&1 ||:) == kd.b8.nz. ]] \ + if [[ $(timeout 1 dig +short @10.2.0.1 -x 10.2.0.2 2>&1 ||:) == kd.b8.nz. ]] \ && ip n show 10.2.0.1 | grep . &>/dev/null; then # note: logic duplicated in 11-iank at_home=true @@ -194,8 +194,8 @@ dry_run=false # mostly for testing rate_limit=no verbose=true; verbose_arg="-l trace" force=false -if [[ $INVOCATION_ID ]]; then - # INVOCATION_ID means running as a systemd service. we cant show progress in this case, +if [[ $PPID == 1 ]]; then + # running as a service. we cant show progress in this case, # but if we pass the arg, it will insert mbuffer into the command. progress_arg= else