All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Minor fixes for non-Linux platforms
@ 2006-10-12  8:33 Christoph Egger
  2006-10-13  9:56 ` Bastian Blank
  0 siblings, 1 reply; 10+ messages in thread
From: Christoph Egger @ 2006-10-12  8:33 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 240 bytes --]


Hello!

The attached patch makes the stuff in tools/check/  work for *BSD systems.
Consider this as a start to make xen buildable on non-Linux platforms.

I don't expect to get this into xen 3.0.3, but I hope this can go into 
-unstable.


[-- Attachment #2: tools_check.diff --]
[-- Type: text/x-diff, Size: 2469 bytes --]

diff -r f14a67a35bec tools/check/check_brctl
--- a/tools/check/check_brctl	Thu Oct 12 17:53:51 2006 +0100
+++ b/tools/check/check_brctl	Thu Oct 12 10:17:33 2006 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # CHECK-INSTALL
 
 function error {
@@ -7,4 +7,18 @@ function error {
    exit 1
 }
 
-which brctl 1>/dev/null 2>&1 || error
+
+case ${OS} in
+OpenBSD|NetBSD|FreeBSD)
+	# These systems have a bridge builtin
+	which brconfig 1>/dev/null 2>&1 || error
+	;;
+Linux)
+	which brctl 1>/dev/null 2>&1 || error
+	;;
+*)
+	echo "Unknown OS" && error
+	;;
+esac
+
+exit 0
diff -r f14a67a35bec tools/check/check_iproute
--- a/tools/check/check_iproute	Thu Oct 12 17:53:51 2006 +0100
+++ b/tools/check/check_iproute	Thu Oct 12 10:17:33 2006 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # CHECK-INSTALL
 
 function error {
@@ -7,5 +7,16 @@ function error {
    exit 1
 }
 
-ip addr list 1>/dev/null 2>&1 || error
+case ${OS} in
+OpenBSD|NetBSD|FreeBSD)
+	ifconfig -a 1>/dev/null 2>&1 || error
+	;;
+Linux)
+	ip addr list 1>/dev/null 2>&1 || error
+	;;
+*)
+	echo "Unknown OS" && error
+	;;
+esac
 
+exit 0	
diff -r f14a67a35bec tools/check/check_python
--- a/tools/check/check_python	Thu Oct 12 17:53:51 2006 +0100
+++ b/tools/check/check_python	Thu Oct 12 10:17:33 2006 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # CHECK-BUILD CHECK-INSTALL
 
 function error {
diff -r f14a67a35bec tools/check/check_zlib_devel
--- a/tools/check/check_zlib_devel	Thu Oct 12 17:53:51 2006 +0100
+++ b/tools/check/check_zlib_devel	Thu Oct 12 10:17:33 2006 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # CHECK-BUILD
 
 function error {
diff -r f14a67a35bec tools/check/check_zlib_lib
--- a/tools/check/check_zlib_lib	Thu Oct 12 17:53:51 2006 +0100
+++ b/tools/check/check_zlib_lib	Thu Oct 12 10:17:33 2006 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # CHECK-BUILD CHECK-INSTALL
 
 function error {
@@ -8,4 +8,4 @@ function error {
 }
 
 set -e
-ldconfig -p | grep -q libz.so || error
+ldconfig -v 2>&1 | grep -q libz.so || error
diff -r f14a67a35bec tools/check/chk
--- a/tools/check/chk	Thu Oct 12 17:53:51 2006 +0100
+++ b/tools/check/chk	Thu Oct 12 10:17:33 2006 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 function usage {
     echo "Usage:"
@@ -13,6 +13,7 @@ function usage {
 }
 
 export PATH=${PATH}:/sbin:/usr/sbin
+export OS=`uname -s`
 
 case $1 in
     build)

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2006-10-17 14:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-12  8:33 [PATCH] Minor fixes for non-Linux platforms Christoph Egger
2006-10-13  9:56 ` Bastian Blank
2006-10-13 11:54   ` Keir Fraser
2006-10-12 12:33     ` Christoph Egger
2006-10-13 16:45       ` Christian Limpach
2006-10-13 21:27       ` Aron Griffis
2006-10-15  8:39         ` Christoph Egger
2006-10-17 14:08           ` Christoph Egger
2006-10-13 21:56       ` Aron Griffis
2006-10-14 15:29         ` Ewan Mellor

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.