Skip to content

Commit

Permalink
only enable Debian's main repository by default
Browse files Browse the repository at this point in the history
This inverts the logic done in c2a85d0 to default to "main only" and allow enabling contrib and non-free on user request.

Closes: #625

Signed-off-by: Evgeni Golov <evgeni@debian.org>
  • Loading branch information
evgeni committed Mar 26, 2016
1 parent a6ab0d4 commit 57b40c0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions templates/lxc-debian.in
Expand Up @@ -512,7 +512,7 @@ Options :
--packages=PACKAGE_NAME1,PACKAGE_NAME2,...
List of additional packages to install. Comma separated, without space.
-c, --clean only clean up the cache and terminate
--main-only include only Debian's main repository (i.e. no contrib and non-free).
--enable-non-free include also Debian's contrib and non-free repositories.
Environment variables:
Expand All @@ -525,7 +525,7 @@ EOF
return 0
}

options=$(getopt -o hp:n:a:r:c -l arch:,clean,help,main-only,mirror:,name:,packages:,path:,release:,rootfs:,security-mirror: -- "$@")
options=$(getopt -o hp:n:a:r:c -l arch:,clean,help,enable-non-free,mirror:,name:,packages:,path:,release:,rootfs:,security-mirror: -- "$@")
if [ $? -ne 0 ]; then
usage $(basename $0)
exit 1
Expand All @@ -541,6 +541,7 @@ elif [ "$arch" = "armv7l" ]; then
arch="armhf"
fi
hostarch=$arch
mainonly=1

while true
do
Expand All @@ -550,7 +551,7 @@ do

-a|--arch) arch=$2; shift 2;;
-c|--clean) clean=1; shift 1;;
--main-only) mainonly=1; shift 1;;
--enable-non-free) mainonly=0; shift 1;;
--mirror) MIRROR=$2; shift 2;;
-n|--name) name=$2; shift 2;;
--packages) packages=$2; shift 2;;
Expand Down

0 comments on commit 57b40c0

Please sign in to comment.