]>
Commit | Line | Data |
---|---|---|
98f552c2 DB |
1 | #!/bin/bash |
2 | ||
3 | # Generate a certificate for the systemtap server and add it to the | |
4 | # database of trusted servers for the client. | |
5 | # | |
1114c4f2 | 6 | # Copyright (C) 2009-2011 Red Hat Inc. |
98f552c2 DB |
7 | # |
8 | # This file is part of systemtap, and is free software. You can | |
9 | # redistribute it and/or modify it under the terms of the GNU General | |
10 | # Public License (GPL); either version 2, or (at your option) any | |
11 | # later version. | |
12 | ||
13 | # Common environment setup for stap scripts | |
14 | ||
1114c4f2 | 15 | # Installation directories |
98f552c2 DB |
16 | # INSTALL-HOOK These settings work for running the server from the source tree |
17 | # INSTALL-HOOK using the dejagnu test harness and will be overridden at install | |
18 | # INSTALL-HOOK time. | |
98f552c2 | 19 | stap_sysconfdir=`pwd`/net |
961588fd | 20 | stap_pkglibexecdir= |
60045090 | 21 | stap_localstatedir=`pwd`/net/var |
98f552c2 DB |
22 | |
23 | # General configuration | |
98f552c2 DB |
24 | stap_avahi_service_tag=_stap._tcp |
25 | ||
26 | # NSS certificate databases | |
36b66efa DB |
27 | if test "X$SYSTEMTAP_DIR" = "X"; then |
28 | stap_user_ssl_db=$HOME/.systemtap/ssl | |
29 | else | |
30 | stap_user_ssl_db=$SYSTEMTAP_DIR/ssl | |
31 | fi | |
35e88656 | 32 | stap_certfile=stap.cert |
a6a2869a | 33 | |
7901b115 | 34 | function stap_get_arch { |
a6a2869a DB |
35 | # PR4186: Copy logic from coreutils uname (uname -i) to squash |
36 | # i?86->i386. Actually, copy logic from linux top-level Makefile | |
37 | # to squash uname -m -> $(SUBARCH). | |
38e3c3d6 DS |
38 | # |
39 | # This logic needs to match the logic in the systemtap_session | |
7dde4b6e | 40 | # constructor in util.cxx (normalize_machine) |
a6a2869a DB |
41 | |
42 | local machine=`uname -m` | |
a6a2869a | 43 | case $machine in |
dc168c58 | 44 | i?86) machine="i386" ;; |
38e3c3d6 | 45 | sun4u) machine="sparc64" ;; |
dc168c58 FCE |
46 | arm*) machine="arm" ;; |
47 | sa1*) machine="arm" ;; | |
48 | s390*) machine="s390" ;; | |
7dde4b6e | 49 | aarch64) machine="arm64" ;; |
dc168c58 | 50 | ppc*) machine="powerpc" ;; |
38e3c3d6 | 51 | mips*) machine="mips" ;; |
dc168c58 | 52 | sh?) machine="sh" ;; |
38e3c3d6 | 53 | # the default is to just use the output of 'uname -m' |
a6a2869a | 54 | esac |
7dde4b6e FCE |
55 | # NB: see also util.cxx (normalize_machine) |
56 | ||
a6a2869a DB |
57 | echo $machine |
58 | } |