[prev in list] [next in list] [prev in thread] [next in thread] 

List:       olpc-devel
Subject:    Re: oob: add oats_cfg.stream (trivial)
From:       Martin Langhoff <martin () laptop ! org>
Date:       2011-02-22 15:58:39
Message-ID: AANLkTi=BWqnmTZ6cWn67bcO144ZTaBF=S+Psv5Zc6iDn () mail ! gmail ! com
[Download RAW message or body]

Updated with a fix.



m

On Fri, Feb 18, 2011 at 12:26 PM, Martin Langhoff <martin@laptop.org> wrote:
> --
>  martin@laptop.org -- Software Architect - OLPC
>  - ask interesting questions
>  - don't get distracted with shiny stuff  - working code first
>  - http://wiki.laptop.org/go/User:Martinlanghoff
>



-- 
 martin@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff

["0001-oats_cfg-add-support-for-setting-the-stream.patch" (application/octet-stream)]

From b28c41e3c5697dfcd9c6651ca60b4b57db768eec Mon Sep 17 00:00:00 2001
From: Martin Langhoff <martin@laptop.org>
Date: Fri, 18 Feb 2011 12:23:32 -0500
Subject: [PATCH] oats_cfg: add support for setting the stream

Useful in deployments handling different unit models,
or different OS builds.
---
 modules/oats_cfg/README                |    5 ++++-
 modules/oats_cfg/kspost.50.oats_cfg.sh |    5 +++++
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/modules/oats_cfg/README b/modules/oats_cfg/README
index 03461be..50bc2ef 100644
--- a/modules/oats_cfg/README
+++ b/modules/oats_cfg/README
@@ -1,7 +1,7 @@
 This module allows you to configure an OATS server used by olpc-update,
 overriding the default of antitheft.laptop.org
 
-It has 2 options:
+Options:
 
 server: the address of an OATS server to use
 
@@ -11,9 +11,12 @@ to override this behaviour, the school server will not be tried. Useful in
 deployments with good connectivity where antitheft is controlled in a central
 location (as opposed to the specific school).
 
+stream: the update stream - this is helpful when deploying different OS images
+that query the same update server.
 
 Example configuration:
 [oats_cfg]
 server=my-oats-server.mydeployment.com
 ignore_xs=1
+stream=xo15hs
 
diff --git a/modules/oats_cfg/kspost.50.oats_cfg.sh b/modules/oats_cfg/kspost.50.oats_cfg.sh
index 924910e..32989d2 100644
--- a/modules/oats_cfg/kspost.50.oats_cfg.sh
+++ b/modules/oats_cfg/kspost.50.oats_cfg.sh
@@ -5,6 +5,7 @@
 
 server=$(read_config oats_cfg server)
 ignore_xs=$(read_config oats_cfg ignore_xs)
+stream=$(read_config oats_cfg stream)
 
 if [ "$ignore_xs" = "1" ]; then
 	echo "touch /etc/oats-ignore-xs"
@@ -14,3 +15,7 @@ if [ -n "$server" ]; then
 	echo "echo '$server' > /etc/oats-server"
 fi
 
+if [ -n "$stream" ]; then
+	echo "echo '$stream' > /etc/update-stream"
+fi
+
-- 
1.6.2.5



_______________________________________________
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic