Add proper per-file copyright notices/licenses and top-level license.
[bluesky.git] / TBBT / trace_play / sfs_suchown
1 #!/bin/sh
2 #
3 # @(#)sfs_suchown       2.1     97/10/23
4 #
5 #  Copyright (c) 1992-1997,2001 by Standard Performance Evaluation Corporation
6 #       All rights reserved.
7 #               Standard Performance Evaluation Corporation (SPEC)
8 #               6585 Merchant Place, Suite 100
9 #               Warrenton, VA 20187
10 #       This product contains benchmarks acquired from several sources who
11 #       understand and agree with SPEC's goal of creating fair and objective
12 #       benchmarks to measure computer performance.
13 #
14 #       This copyright notice is placed here only to protect SPEC in the
15 #       event the source is misused in any manner that is contrary to the
16 #       spirit, the goals and the intent of SPEC.
17 #
18 #       The source code is provided to the user or company under the license
19 #       agreement for the SPEC Benchmark Suite for this product.
20
21 #
22 SPEC=${SPEC-0}
23
24 if [ "$SPEC" != 0 ] ; then
25         rm -f $BENCH/bin/sfs
26         rm -f $BENCH/bin/sfs3
27         rm -f $BENCH/bin/sfs_syncd
28         rm -f $BENCH/bin/sfs_prime
29         rm -f $BENCH/bin/sfs_mgr
30         rm -f $BENCH/bin/sfs_mcr
31         rm -f $BENCH/bin/sfs_ext_mon
32 fi
33
34 #
35 # If first argument is clobber, just remove executeables
36 #
37 if [ "$1" = "clobber" ]
38 then
39         exit 0
40 fi
41
42 #
43 # if first argument == -DRESVPORT then we must make executeable
44 # setuid to root.
45 #
46 if [ "$1" = "-DRESVPORT" ]
47 then
48         shift
49         echo "Setting root ownership on sfs setuid executable in order to"
50         echo "perform binding to privileged port. You may be asked to enter"
51         echo "the root password."
52         #
53         su $ROOTUSER <<EOF
54         chown root $*
55         chmod 04755 $*
56 EOF
57 fi
58
59 #
60 # if the SPEC tools are configured then move binaries to RESULTSDIR
61 #
62 if [ "$SPEC" != 0 ] ; then
63         mv sfs $BENCH/bin
64         mv sfs3 $BENCH/bin
65         mv sfs_syncd $BENCH/bin
66         mv sfs_prime $BENCH/bin
67         cp sfs_mgr $BENCH/bin
68         cp sfs_mcr $BENCH/bin
69         cp sfs_ext_mon $BENCH/bin
70 fi
71 exit 0