userinstall

Changeset

80:6e63e2716ee2
2015-01-15 Paul Boddie raw files shortlog changelog graph Insist on explicit mirrors for multistrapped systems.
user-setup (file)
     1.1 --- a/user-setup	Thu Jan 15 21:26:32 2015 +0100
     1.2 +++ b/user-setup	Thu Jan 15 21:27:02 2015 +0100
     1.3 @@ -1,6 +1,6 @@
     1.4  #!/bin/sh
     1.5  
     1.6 -# Copyright (C) 2007, 2008, 2010, 2011, 2012, 2013 Paul Boddie <paul@boddie.org.uk>
     1.7 +# Copyright (C) 2007, 2008, 2010, 2011, 2012, 2013, 2014 Paul Boddie <paul@boddie.org.uk>
     1.8  #
     1.9  # This program is free software; you can redistribute it and/or modify it under
    1.10  # the terms of the GNU General Public License as published by the Free Software
    1.11 @@ -27,7 +27,7 @@
    1.12  
    1.13  if [ "$1" = "--help" ]; then
    1.14          cat 1>&2 <<EOF
    1.15 -Usage: `basename $0` [ --root [ --multistrap [ -f <config> ] ] ] [ <mirror> ]
    1.16 +Usage: `basename $0` [ --root [ --multistrap [ -f <config> ] <mirror> ] ] [ <mirror> ]
    1.17  
    1.18  Examples:
    1.19  
    1.20 @@ -62,6 +62,12 @@
    1.21  fi
    1.22  
    1.23  MIRROR="$1"
    1.24 +
    1.25 +if [ "$USE_MULTISTRAP" ] && [ ! "$MIRROR" ]; then
    1.26 +	echo "Multistrap usage requires that a mirror be specified." 1>&2
    1.27 +	exit 1
    1.28 +fi
    1.29 +
    1.30  PATH=$PATH${PATH:+:}/usr/sbin:/sbin
    1.31  
    1.32  # For multistrap, make a configuration file and use it to invoke multistrap.
    1.33 @@ -78,7 +84,7 @@
    1.34  aptsources=Debian
    1.35  
    1.36  [Debian]
    1.37 -packages=gnupg
    1.38 +packages=apt
    1.39  source=$MIRROR
    1.40  keyring=$ARCHIVE_KEYRING
    1.41  suite=$USERINSTALL_CODENAME