On 12/31/2012 02:49 PM, Natanael Copa wrote:
> Let users append a list of packages they want install in the container
> 
> Signed-off-by: Natanael Copa <nc...@alpinelinux.org>

Looks good. Pushed.

Acked-by: Stéphane Graber <stgra...@ubuntu.com>

> ---
>  templates/lxc-alpine.in | 11 ++++-------
>  1 file changed, 4 insertions(+), 7 deletions(-)
> 
> diff --git a/templates/lxc-alpine.in b/templates/lxc-alpine.in
> index 5b685b1..b06215f 100644
> --- a/templates/lxc-alpine.in
> +++ b/templates/lxc-alpine.in
> @@ -2,6 +2,7 @@
>  
>  install_alpine() {
>      rootfs="$1"
> +    shift
>      mkdir -p "$rootfs"/etc/apk || return 1
>      cp -r ${keys_dir:-/etc/apk/keys} "$rootfs"/etc/apk/
>      if [ -n "$repository" ]; then
> @@ -13,7 +14,7 @@ install_alpine() {
>      if [ -n "$apk_arch" ]; then
>          opt_arch="--arch $apk_arch"
>      fi
> -    ${APK:-apk} add -U --initdb --root $rootfs $opt_arch alpine-base
> +    ${APK:-apk} add -U --initdb --root $rootfs $opt_arch "$@" alpine-base
>  }
>  
>  configure_alpine() {
> @@ -128,7 +129,7 @@ die() {
>  usage() {
>      cat >&2 <<EOF
>  Usage: $(basename $0) [-h|--help] [-r|--repository <url>] [-a|--arch <arch>]
> -                   -p|--path <path> -n|--name <name>
> +                   -p|--path <path> -n|--name <name> [PKG...]
>  EOF
>  }
>  
> @@ -186,10 +187,6 @@ while [ $# -gt 0 ]; do
>          # split opts -abc into -a -b -c
>          set -- $(echo "${opt#-}" | sed 's/\(.\)/ -\1/g') "$@"
>          ;;
> -    *)
> -        usage
> -        exit 1
> -        ;;
>      esac
>  done
>  
> @@ -217,6 +214,6 @@ case "$arch" in
>       *)      die "unsupported architecture: $arch";;
>  esac
>  
> -install_alpine "$rootfs" || die "Failed to install rootfs for $name"
> +install_alpine "$rootfs" "$@" || die "Failed to install rootfs for $name"
>  configure_alpine "$rootfs" "$name" || die "Failed to configure $name"
>  copy_configuration "$path" "$rootfs" "$name"
> 


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to