[lxc-devel] [PATCH] lxc-alpine: make --release work when apk exists
Serge Hallyn
serge.hallyn at ubuntu.com
Fri Jun 28 19:37:55 UTC 2013
Quoting Natanael Copa (ncopa at alpinelinux.org):
> Use sed to set the specified alpine release in the copied
> /etc/apk/repositories
>
> Signed-off-by: Natanael Copa <ncopa at alpinelinux.org>
Thanks, applied.
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>
> ---
> templates/lxc-alpine.in | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/templates/lxc-alpine.in b/templates/lxc-alpine.in
> index 410c817..be2a535 100644
> --- a/templates/lxc-alpine.in
> +++ b/templates/lxc-alpine.in
> @@ -84,6 +84,10 @@ install_alpine() {
> echo "$repository" > "$rootfs"/etc/apk/repositories
> else
> cp /etc/apk/repositories "$rootfs"/etc/apk/repositories || return 1
> + if [ -n "$release" ]; then
> + sed -i -e "s:/[^/]\+/\([^/]\+\)$:/$release/\1:" \
> + "$rootfs"/etc/apk/repositories
> + fi
> fi
> opt_arch=
> if [ -n "$apk_arch" ]; then
> --
> 1.8.3.1
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Lxc-devel mailing list
> Lxc-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-devel
More information about the lxc-devel
mailing list