Added checks for variables (QA Machines only) allowing them to be set from the comman...
authorAllan Randall <allanr@sgi.com>
Fri, 4 Aug 2006 13:47:09 +0000 (13:47 +0000)
committerAllan Randall <allanr@sgi.com>
Fri, 4 Aug 2006 13:47:09 +0000 (13:47 +0000)
Merge of master-melb:xfs-cmds:26652a by kenmcd.

  Added checks for variables (QA Machines only) allowing them to be set from the command line without being overwritten

common.config

index 8442bdd8057696e60326572b222e4b49e8ef62d8..5cdfdda2bf945b2b0a33c9a80c5d8c38c3a21161 100644 (file)
@@ -148,17 +148,15 @@ known_hosts()
        case "$HOST"
        in
            sheila)
-               MODULAR=1
+               #dedicated qa machine (has some values already set)
+               [ -z "$MODULAR" ] && MODULAR=1
                EMAIL="nathans@larry"
-               SCRATCH_MNT=/mnt/scratch
-               SCRATCH_DEV=/dev/hdb1
-               TEST_DIR=/mnt/test
-               TEST_DEV=/dev/hdb2
-               TEST_LOGDEV=/dev/hdb3
-               SCRATCH_LOGDEV=/dev/hdb5
-               #RMT_TAPE_DEV=bruce:/dev/st0
-               #RMT_IRIXTAPE_DEV=snort:/dev/tape
-               #RMT_TAPE_USER=guest
+               [ -z "$SCRATCH_MNT" ] && SCRATCH_MNT=/mnt/scratch
+               [ -z "$SCRATCH_DEV" ] && SCRATCH_DEV=/dev/hdb1
+               [ -z "$TEST_DIR" ] && TEST_DIR=/mnt/test
+               [ -z "$TEST_DEV" ] && TEST_DEV=/dev/hdb2
+               [ -z "$TEST_LOGDEV" ] && TEST_LOGDEV=/dev/hdb3
+               [ -z "$SCRATCH_LOGDEV" ] && SCRATCH_LOGDEV=/dev/hdb5
                ;;
             break)
                MODULAR=1
@@ -283,20 +281,16 @@ known_hosts()
                SCRATCH_MNT=/qa/scratch
                ;;
             dribble)
-                MODULAR=0
+               #dedicated qa machine (has some values already set)
+                [ -z "$MODULAR" ] && MODULAR=0
                 EMAIL="ajones@sgi.com"
-                TEST_DIR=/mnt/test
-                TEST_DEV=/dev/dsk/dks0d2s0
-                #TEST_LOGDEV=
-                SCRATCH_MNT=/mnt/scratch
-               #SCRATCH_DEV=emu:/mnt/scratch
-               SCRATCH_DEV=/dev/dsk/dks0d2s1
-                #SCRATCH_LOGDEV=
-                #SCRATCH_RTDEV=
-                TAPE_DEV=/dev/tape
-                RMT_TAPE_DEV=icy:/dev/st0
-                RMT_TAPE_USER=guest
-                #RMT_IRIXTAPE_DEV=snort:/dev/tape
+                [ -z "$TEST_DIR" ] && TEST_DIR=/mnt/test
+                [ -z "$TEST_DEV" ] && TEST_DEV=/dev/dsk/dks0d2s0
+                [ -z "$SCRATCH_MNT" ] && SCRATCH_MNT=/mnt/scratch
+               [ -z "$SCRATCH_DEV" ] && SCRATCH_DEV=/dev/dsk/dks0d2s1
+                [ -z "$TAPE_DEV" ] && TAPE_DEV=/dev/tape
+                [ -z "$RMT_TAPE_DEV" ] && RMT_TAPE_DEV=icy:/dev/st0
+                [ -z "$RMT_TAPE_USER" ] && RMT_TAPE_USER=guest
                 ;;
             cxfsirix1)
                 EMAIL="ajones@sgi.com"
@@ -321,19 +315,17 @@ known_hosts()
                SCRATCH_DEV=/dev/sdb2
                ;;
            inferno)
-               MODULAR=1
+               #dedicated qa machine (has some values already set)
+               [ -z "$MODULAR" ] && MODULAR=1
                EMAIL="ajones@sgi.com"
-               TEST_DIR=/mnt/test
-               TEST_DEV=/dev/sdb1
-               TEST_LOGDEV=/dev/sdb3
-               SCRATCH_MNT=/mnt/scratch
-               SCRATCH_DEV=/dev/sdb2
-               SCRATCH_LOGDEV=/dev/sdb4
-               #SCRATCH_RTDEV=/dev/sdb5
-               TAPE_DEV=/dev/st0
-               #RMT_IRIXTAPE_DEV=snort:/dev/tape
-               #RMT_TAPE_DEV=icy:/dev/st0
-               #RMT_TAPE_USER=guest
+               [ -z "$TEST_DIR" ] && TEST_DIR=/mnt/test
+               [ -z "$TEST_DEV" ] && TEST_DEV=/dev/sdb1
+               [ -z "$TEST_LOGDEV" ] && TEST_LOGDEV=/dev/sdb3
+               [ -z "$SCRATCH_MNT" ] && SCRATCH_MNT=/mnt/scratch
+               [ -z "$SCRATCH_DEV" ] && SCRATCH_DEV=/dev/sdb2
+               [ -z "$SCRATCH_LOGDEV" ] && SCRATCH_LOGDEV=/dev/sdb4
+               #[ -z "$SCRATCH_RTDEV" ] && SCRATCH_RTDEV=/dev/sdb5
+               [ -z "$TAPE_DEV" ] && TAPE_DEV=/dev/st0
                ;;
            hellfire)
                MODULAR=1
@@ -404,19 +396,17 @@ known_hosts()
                #RMT_TAPE_USER=guest
                ;;
            porky)
-               MODULAR=1
+               #dedicated qa machine (has some values already set)
+               [ -z "$MODULAR" ] && MODULAR=1
                EMAIL="ajones@sgi.com"
-               TEST_DIR=/mnt/test
-               TEST_DEV=/dev/sdb1
-               TEST_LOGDEV=/dev/sdb3
-               SCRATCH_MNT=/mnt/scratch
-               SCRATCH_DEV=/dev/sdb2
-               SCRATCH_LOGDEV=/dev/sdb4
-               #SCRATCH_RTDEV=/dev/sdb7
-               #TAPE_DEV=/dev/st0
-               #RMT_IRIXTAPE_DEV=snort:/dev/tape
-               #RMT_TAPE_DEV=icy:/dev/st0
-               #RMT_TAPE_USER=guest
+               [ -z "$TEST_DIR" ] && TEST_DIR=/mnt/test
+               [ -z "$TEST_DEV" ] && TEST_DEV=/dev/sdb1
+               [ -z "$TEST_LOGDEV" ] && TEST_LOGDEV=/dev/sdb3
+               [ -z "$SCRATCH_MNT" ] && SCRATCH_MNT=/mnt/scratch
+               [ -z "$SCRATCH_DEV" ] && SCRATCH_DEV=/dev/sdb2
+               [ -z "$SCRATCH_LOGDEV" ] && SCRATCH_LOGDEV=/dev/sdb4
+               #[ -z "$SCRATCH_RTDEV" ] && SCRATCH_RTDEV=/dev/sdb7
+               #[ -z "$TAPE_DEV" ] && TAPE_DEV=/dev/st0
                ;;
            puffy)
                MODULAR=1
@@ -439,19 +429,16 @@ known_hosts()
                #RMT_TAPE_USER=guest
                ;;
              screamer)
-                MODULAR=1
+               #dedicated qa machine (has some values already set)
+                [ -z "$MODULAR" ] && MODULAR=1
                 EMAIL="ddiss@sgi.com"
-                TEST_DIR=/mnt/test
-                TEST_DEV=/dev/sdb1
-                #TEST_LOGDEV=/dev/sdb3
-                SCRATCH_MNT=/mnt/scratch
-                SCRATCH_DEV=/dev/sdb2
-                #SCRATCH_LOGDEV=/dev/sdb4
-                #SCRATCH_RTDEV=/dev/sdb5
-                #TAPE_DEV=/dev/st0
-                #RMT_IRIXTAPE_DEV=snort:/dev/tape
-                #RMT_TAPE_DEV=icy:/dev/st0
-                #RMT_TAPE_USER=guest
+                [ -z "$TEST_DIR" ] && TEST_DIR=/mnt/test
+                [ -z "$TEST_DEV" ] && TEST_DEV=/dev/sdb1
+                #[ -z "$TEST_LOGDEV" ] && TEST_LOGDEV=/dev/sdb3
+                [ -z "$SCRATCH_MNT" ] && SCRATCH_MNT=/mnt/scratch
+                [ -z "$SCRATCH_DEV" ] && SCRATCH_DEV=/dev/sdb2
+                #[ -z "$SCRATCH_LOGDEV" ] && SCRATCH_LOGDEV=/dev/sdb4
+                #[ -z "$SCRATCH_RTDEV" ] && SCRATCH_RTDEV=/dev/sdb5
                 ;;
             *)
                echo "Error: need to define parameters for host $HOST"