Overview
Comment: | Merged nbfake fix |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.60 | v1.6005_ww44.3 |
Files: | files | file ages | folders |
SHA1: |
f050e1d721067f7a5a33effa60ce61af |
User & Date: | mrwellan on 2014-10-29 16:03:09 |
Other Links: | branch diff | manifest | tags |
Context
2014-10-29
| ||
17:29 | Fixed nbfake variable handling - was causing log files disappearing check-in: 9926990b7a user: mrwellan tags: v1.60, v1.6005_ww44.5 | |
16:03 | Merged nbfake fix check-in: f050e1d721 user: mrwellan tags: v1.60, v1.6005_ww44.3 | |
15:46 | Fix local variable name in nbfake Closed-Leaf check-in: 794eaa8cad user: tyardeni tags: v1.60-nbfake-stderr | |
13:57 | Merged Tal's nbfake fix to v1.60 check-in: 02d61b3703 user: mrwellan tags: v1.60 | |
Changes
tests/installall/config/megatest.config.dat became a regular file with contents [736a5da885].
tests/installall/config/runconfigs.config.dat became a regular file with contents [3b8f260acb].
Modified utils/nbfake from [3b8b8dce99] to [5ee8863c91].
1 2 3 4 5 6 7 8 9 10 11 | #!/bin/bash ############################################################################### # # nbfake - capture command output in a logfile # # nbfake behavior can be changed by setting the following env vars: # NBFAKE_HOST SSH to $NBFAKE_HOST and run command # NBFAKE_LOG Logfile for nbfake output # ############################################################################### | < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #!/bin/bash ############################################################################### # # nbfake - capture command output in a logfile # # nbfake behavior can be changed by setting the following env vars: # NBFAKE_HOST SSH to $NBFAKE_HOST and run command # NBFAKE_LOG Logfile for nbfake output # ############################################################################### if [[ -z "$@" ]]; then cat <<__EOF nbfake usage: nbfake <command to run> |
︙ | ︙ | |||
30 31 32 33 34 35 36 | #============================================================================== # Can't always trust $PWD CURRWD=$(pwd) # Make sure nbfake host and logfile are set. Fall back to old-style variable names | | > > > > > > | > > > > > | | | | | | | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | #============================================================================== # Can't always trust $PWD CURRWD=$(pwd) # Make sure nbfake host and logfile are set. Fall back to old-style variable names if [[ -z "$NBFAKE_HOST" && -n "$TARGETHOST" ]]; then MY_NBFAKE_HOST=$TARGETHOST else MY_NBFAKE_HOST=$NBFAKE_HOST unset NBFAKE_HOST fi if [[ -z "$NBFAKE_LOG" && -n "$TARGETHOST_LOGF" ]]; then MY_NBFAKE_LOG=$TARGETHOST_LOGF else MY_NBFAKE_LOG=$NBFAKE_LOG unset NBFAKE_LOG fi # Set default nbfake log if [[ -z "$MY_NBFAKE_LOG" ]]; then MY_NBFAKE_LOG=NBFAKE-$(date +%GWW%V.%u_%T) fi #============================================================================== # Run and log #============================================================================== cat <<__EOF >&2 #====================================================================== # NBFAKE logging command to: $MY_NBFAKE_LOG # $* #====================================================================== __EOF if [[ -z "$MY_NBFAKE_HOST" ]]; then # Run locally sh -c "cd $CURRWD;export DISPLAY=$DISPLAY; export PATH=$PATH; nohup $* >> $MY_NBFAKE_LOG 2>&1 &" else # run remotely ssh -n -f $MY_NBFAKE_HOST "sh -c \"cd $CURRWD;export DISPLAY=$DISPLAY; export PATH=$PATH; nohup $* >> $MY_NBFAKE_LOG 2>&1 &\"" fi |