On Wed, Mar 05, 2014 at 10:44:30PM +0000, Roger Leigh wrote:
> On Wed, Mar 05, 2014 at 11:19:17PM +0100, Christoph Egger wrote:
> > Hi!
> > 
> > Roger Leigh <rle...@codelibre.net> writes:
> > > These are the three files which actually use this.  We should
> > > probably be using $(uname -s) and FreeBSD for all these
> > > checks?  On FreeBSD 10, I get:
> > >
> > > % uname -s
> > > FreeBSD
> > 
> > > So assuming it's the same for kFreeBSD, that's easy enough.
> > 
> > % uname -s
> > GNU/kFreeBSD
> > 
> > So maybe *FreeBSD?
> 
> Yes, that should do the job, thanks.  I'll get this fixed in the
> next day or so.

Please could you try the attached patch and let me know if it solves
the problem for you?


Thanks,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux    http://people.debian.org/~rleigh/
 `. `'   schroot and sbuild  http://alioth.debian.org/projects/buildd-tools
   `-    GPG Public Key      F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800
>From f61653a68f24bf3debc6d7400fbf969b8bbb1af9 Mon Sep 17 00:00:00 2001
From: Roger Leigh <rle...@codelibre.net>
Date: Sat, 8 Mar 2014 12:45:52 +0000
Subject: [PATCH] setup.d: Replace $HOST_OS usage with "uname -s"

---
 contrib/setup.d/05customdir |  4 ++--
 etc/setup.d/10mount         |  8 ++++----
 etc/setup.d/common-data     |  4 ++--
 man/schroot-setup.5.man     | 12 ------------
 4 files changed, 8 insertions(+), 20 deletions(-)

diff --git a/contrib/setup.d/05customdir b/contrib/setup.d/05customdir
index 8ae8708..aa5c915 100755
--- a/contrib/setup.d/05customdir
+++ b/contrib/setup.d/05customdir
@@ -62,8 +62,8 @@ if [ "$CHROOT_TYPE" = "custom" ] && [ -n "$CUSTOM_DIR" ]; then
 
         info "CUSTOM SETUP using $CUSTOM_DIR"
 
-        case "$HOST_OS" in
-            freebsd* | k*bsd*-gnu) :
+        case "$(uname -s)" in
+            *FreeBSD) :
                 BINDOPT="-t nullfs"
                 ;;
             *):
diff --git a/etc/setup.d/10mount b/etc/setup.d/10mount
index 34666bf..0d4a2a3 100755
--- a/etc/setup.d/10mount
+++ b/etc/setup.d/10mount
@@ -136,8 +136,8 @@ if [ "$CHROOT_TYPE" = "directory" ] \
 
     if [ $STAGE = "setup-start" ] || [ $STAGE = "setup-recover" ]; then
 
-        case "$HOST_OS" in
-            freebsd* | k*bsd*-gnu) :
+        case "$(uname -s)" in
+            *FreeBSD) :
                 BINDOPT="-t nullfs"
                 ;;
             *):
@@ -166,8 +166,8 @@ if [ "$CHROOT_TYPE" = "directory" ] \
                     fatal "File '$CHROOT_FILE' does not exist"
             fi
 
-            case "$HOST_OS" in
-                freebsd* | k*bsd*-gnu):
+            case "$(uname -s)" in
+                *FreeBSD):
                     LOOP_DEVICE="/dev/$(/sbin/mdconfig -a -t vnode -f "$CHROOT_FILE")"
                     CHROOT_MOUNT_DEVICE="$LOOP_DEVICE"
                     ;;
diff --git a/etc/setup.d/common-data b/etc/setup.d/common-data
index 9c855c6..7c9a78c 100644
--- a/etc/setup.d/common-data
+++ b/etc/setup.d/common-data
@@ -24,8 +24,8 @@ STATUS="$2"
 
 
 # FreeBSD uses character devices in place of block devices
-case "$HOST_OS" in
-    freebsd* | k*bsd*-gnu) :
+case "$(uname -s)" in
+    *FreeBSD) :
         DEVTYPE="-c"
         ;;
     *):
diff --git a/man/schroot-setup.5.man b/man/schroot-setup.5.man
index fdf8ac6..836634e 100644
--- a/man/schroot-setup.5.man
+++ b/man/schroot-setup.5.man
@@ -58,18 +58,6 @@ CHROOT_NAME
 The chroot name.  Note that this is the name of the orignal chroot before
 session creation; you probably want SESSION_ID.
 .TP
-HOST
-.TP
-HOST_OS
-.TP
-HOST_VENDOR
-.TP
-HOST_CPU
-The host system architecture schroot is running upon.  This may be used to
-introduce architecture-specific behaviour into the setup scripts where
-required.  HOST is the GNU triplet for the architecture, while HOST_OS,
-HOST_VENDOR and HOST_CPU are the component parts of the triplet.
-.TP
 LIBEXEC_DIR
 The directory under which helper programs are located.
 .TP
-- 
1.9.0

Reply via email to