set-mirror.sh revision 211730
1211485Simp#!/bin/sh 2211485Simp#- 3211485Simp# Copyright (c) 2010 iXSystems, Inc. All rights reserved. 4211485Simp# 5211485Simp# Redistribution and use in source and binary forms, with or without 6211485Simp# modification, are permitted provided that the following conditions 7211485Simp# are met: 8211485Simp# 1. Redistributions of source code must retain the above copyright 9211485Simp# notice, this list of conditions and the following disclaimer. 10211485Simp# 2. Redistributions in binary form must reproduce the above copyright 11211485Simp# notice, this list of conditions and the following disclaimer in the 12211485Simp# documentation and/or other materials provided with the distribution. 13211485Simp# 14211485Simp# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15211485Simp# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16211485Simp# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17211485Simp# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18211485Simp# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19211485Simp# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20211485Simp# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21211485Simp# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22211485Simp# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23211485Simp# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24211485Simp# SUCH DAMAGE. 25211485Simp# 26211485Simp# $FreeBSD: head/usr.sbin/pc-sysinstall/backend-query/set-mirror.sh 211730 2010-08-24 06:11:46Z imp $ 27211485Simp 28211485Simp. ${PROGDIR}/backend/functions.sh 29211485Simp. ${PROGDIR}/backend/functions-ftp.sh 30211485Simp 31211485SimpMIRROR="${1}" 32211485Simp 33211485Simpif [ -z "${MIRROR}" ] 34211485Simpthen 35211730Simp echo "Error: No mirror specified!" 36211730Simp exit 1 37211485Simpfi 38211485Simp 39211485Simpset_ftp_mirror "${MIRROR}" 40211485Simpexit 0 41