diff options
author | Daniel Drake <dsd@laptop.org> | 2010-04-12 18:20:44 (GMT) |
---|---|---|
committer | Daniel Drake <dan@reactivated.net> | 2010-04-12 18:38:28 (GMT) |
commit | 54443c0d904839e009d32d27b8bf42d901980561 (patch) | |
tree | f4a70cefff42befc32611138a5044cda516afefb /modules/oats_cfg | |
parent | c95ec1e5c1b9e4339dc19adf3bc0c47cdb2602e3 (diff) |
Add module for configuring OATS server
Used by olpc-update-query
Diffstat (limited to 'modules/oats_cfg')
-rw-r--r-- | modules/oats_cfg/README | 19 | ||||
-rw-r--r-- | modules/oats_cfg/kspost.50.oats_cfg.sh | 16 |
2 files changed, 35 insertions, 0 deletions
diff --git a/modules/oats_cfg/README b/modules/oats_cfg/README new file mode 100644 index 0000000..03461be --- /dev/null +++ b/modules/oats_cfg/README @@ -0,0 +1,19 @@ +This module allows you to configure an OATS server used by olpc-update, +overriding the default of antitheft.laptop.org + +It has 2 options: + +server: the address of an OATS server to use + +ignore_xs: by default, the OATS client always contacts the school server +before trying other servers (maybe not even trying them at all). set this to 1 +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). + + +Example configuration: +[oats_cfg] +server=my-oats-server.mydeployment.com +ignore_xs=1 + diff --git a/modules/oats_cfg/kspost.50.oats_cfg.sh b/modules/oats_cfg/kspost.50.oats_cfg.sh new file mode 100644 index 0000000..00c62c6 --- /dev/null +++ b/modules/oats_cfg/kspost.50.oats_cfg.sh @@ -0,0 +1,16 @@ +# Copyright (C) 2010 One Laptop Per Child +# Licensed under the terms of the GNU GPL v2 or later; see COPYING for details. + +. $OOB__shlib + +server=$(read_config oats_cfg server) +ignore_xs=$(read_config oats_cfg ignore_xs) + +if [ "$ignore_xs" = "1" ]; then + echo "touch /security/oats-ignore-xs" +fi + +if [ -n "$server" ]; then + echo "echo '$server' > /security/oats-server" +fi + |