This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[PATCH 1/4] Prepare stap-prep for support for non-rpm systems
- From: Timo Juhani Lindfors <timo dot lindfors at iki dot fi>
- To: systemtap at sourceware dot org
- Cc: Timo Juhani Lindfors <timo dot lindfors at iki dot fi>
- Date: Thu, 7 Mar 2013 10:30:02 +0200
- Subject: [PATCH 1/4] Prepare stap-prep for support for non-rpm systems
---
stap-prep | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/stap-prep b/stap-prep
index a5da108..24d7131 100755
--- a/stap-prep
+++ b/stap-prep
@@ -2,6 +2,7 @@
LANG=C; export LANG
check_error() { if test $1 != 0; then echo $2; exit $1; fi }
+prep_rpm_based() {
# uname -r can produce different kinds of output:
# 2.6.32-30.el6.x86_64 (no variant, but including ".arch")
# 2.6.18-194.3.1.el5debug ("variant", without dot, no arch)
@@ -43,3 +44,14 @@ if [ "$NEEDED" != "" ]; then
rm -r $DIR #cleanup
fi
fi
+}
+
+DISTRO="$(lsb_release --id --short 2> /dev/null)"
+if [ $? -ne 0 ]; then
+ DISTRO="unknown"
+fi
+case "$DISTRO" in
+*)
+ prep_rpm_based "$@"
+ ;;
+esac
--
1.7.2.5