summaryrefslogtreecommitdiffstats
path: root/build/f_isoroot/f_repobuild/select_ubuntu_repo.sh
diff options
context:
space:
mode:
authorMichal Skalski <mskalski@mirantis.com>2016-01-21 02:17:11 +0100
committerMichal Skalski <mskalski@mirantis.com>2016-01-21 16:16:35 +0100
commit394c79fe428faa9c50ed1db6d750b363b44130b9 (patch)
tree5d85301c6b29dfa34ac389d315d562a873b5c91b /build/f_isoroot/f_repobuild/select_ubuntu_repo.sh
parentf1cdd0c49d4495a59bd797ee7353cef816976d4a (diff)
Use mirrors snapshots
Add logic to fetch information about last suitable snapshot which can be used to download ubuntu packages. This is for example use to build community ISO [1]. This should help in case of snapshot switch [2]. [1] https://github.com/fuel-infra/jenkins-jobs/blob/master/servers/fuel-ci/8.0/builders/community.all.sh#L36-L40 [2] https://bugs.launchpad.net/fuel/+bug/1493390/comments/9 Change-Id: Id5a8d41278561473ea4844631bfefa0049e64dbc Signed-off-by: Michal Skalski <mskalski@mirantis.com>
Diffstat (limited to 'build/f_isoroot/f_repobuild/select_ubuntu_repo.sh')
-rwxr-xr-xbuild/f_isoroot/f_repobuild/select_ubuntu_repo.sh28
1 files changed, 25 insertions, 3 deletions
diff --git a/build/f_isoroot/f_repobuild/select_ubuntu_repo.sh b/build/f_isoroot/f_repobuild/select_ubuntu_repo.sh
index cb05fe136..992359afd 100755
--- a/build/f_isoroot/f_repobuild/select_ubuntu_repo.sh
+++ b/build/f_isoroot/f_repobuild/select_ubuntu_repo.sh
@@ -11,6 +11,19 @@ RSYNC="rsync -4 --contimeout 5 --no-motd --list-only"
# local mirror can be found after four attempts, the default archive
# is returned instead.
+return_url=0
+
+while [ "$1" != "" ]; do
+ case $1 in
+ -u | --url ) shift
+ return_url=1
+ ;;
+ # Shift all the parameters down by one
+ esac
+ shift
+done
+
+
cnt=0
while [ $cnt -lt 4 ]
do
@@ -21,13 +34,22 @@ do
then
if ! $RSYNC "${host}::ubuntu/Archive-Update-in-Progress*" &> /dev/null
then
- echo "$host"
- exit 0
+ if [ "$return_url" = "1" ]; then
+ echo "$url"
+ exit 0
+ else
+ echo "$host"
+ exit 0
+ fi
fi
fi
done
cnt=$[cnt + 1]
sleep 15
done
-echo "archive.ubuntu.com"
+if [ "$return_url" = "1" ]; then
+ echo "http://archive.ubuntu.com/ubuntu/"
+else
+ echo "archive.ubuntu.com"
+fi
ighlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
/*
 * Ultra Wide Band
 * Debug interface commands
 *
 * Copyright (C) 2008 Cambridge Silicon Radio Ltd.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License version
 * 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#ifndef __LINUX__UWB__DEBUG_CMD_H__
#define __LINUX__UWB__DEBUG_CMD_H__

#include <linux/types.h>

/*
 * Debug interface commands
 *
 * UWB_DBG_CMD_RSV_ESTABLISH: Establish a new unicast reservation.
 *
 * UWB_DBG_CMD_RSV_TERMINATE: Terminate the Nth reservation.
 */

enum uwb_dbg_cmd_type {
	UWB_DBG_CMD_RSV_ESTABLISH = 1,
	UWB_DBG_CMD_RSV_TERMINATE = 2,
	UWB_DBG_CMD_IE_ADD = 3,
	UWB_DBG_CMD_IE_RM = 4,
	UWB_DBG_CMD_RADIO_START = 5,
	UWB_DBG_CMD_RADIO_STOP = 6,
};

struct uwb_dbg_cmd_rsv_establish {
	__u8  target[6];
	__u8  type;
	__u16 max_mas;
	__u16 min_mas;
	__u8  max_interval;
};

struct uwb_dbg_cmd_rsv_terminate {
	int index;
};

struct uwb_dbg_cmd_ie {
	__u8 data[128];
	int len;
};

struct uwb_dbg_cmd {
	__u32 type;
	union {
		struct uwb_dbg_cmd_rsv_establish rsv_establish;
		struct uwb_dbg_cmd_rsv_terminate rsv_terminate;
		struct uwb_dbg_cmd_ie ie_add;
		struct uwb_dbg_cmd_ie ie_rm;
	};
};

#endif /* #ifndef __LINUX__UWB__DEBUG_CMD_H__ */