]> sourceware.org Git - systemtap.git/blob - stap-env
PR13513: undo PR11759 PREEMPT_RT hack
[systemtap.git] / stap-env
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 #
6 # Copyright (C) 2009-2011 Red Hat Inc.
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
15 # Installation directories
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.
19 stap_sysconfdir=`pwd`/net
20 stap_pkglibexecdir=
21 stap_localstatedir=`pwd`/net/var
22
23 # General configuration
24 stap_avahi_service_tag=_stap._tcp
25
26 # NSS certificate databases
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
32 stap_certfile=stap.cert
33
34 function stap_get_arch {
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).
38 #
39 # This logic needs to match the logic in the systemtap_session
40 # constructor in session.cxx.
41
42 local machine=`uname -m`
43 case $machine in
44 i?86) machine="i386" ;;
45 sun4u) machine="sparc64" ;;
46 arm*) machine="arm" ;;
47 sa1*) machine="arm" ;;
48 s390*) machine="s390" ;;
49 ppc*) machine="powerpc" ;;
50 mips*) machine="mips" ;;
51 sh?) machine="sh" ;;
52 # the default is to just use the output of 'uname -m'
53 esac
54
55 echo $machine
56 }
This page took 0.039823 seconds and 5 git commands to generate.