[lxc-devel] [PATCH] plamo: Improve template

Stéphane Graber stgraber at ubuntu.com
Thu Jan 23 00:58:26 UTC 2014


On Thu, Jan 23, 2014 at 02:29:42AM +0900, KATOH Yasufumi wrote:
> allow not to specify a variable that is related installed packages
> 
> Signed-off-by: TAMUKI Shoichi <tamuki at linet.gr.jp>
> Signed-off-by: KATOH Yasufumi <karma at jazz.email.ne.jp>

Acked-by: Stéphane Graber <stgraber at ubuntu.com>

> ---
>  templates/lxc-plamo.in | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/templates/lxc-plamo.in b/templates/lxc-plamo.in
> index c5a02ee..dd8d29b 100644
> --- a/templates/lxc-plamo.in
> +++ b/templates/lxc-plamo.in
> @@ -33,11 +33,11 @@
>  DLSCHEME=${DLSCHEME:-"http"}
>  MIRRORSRV=${MIRRORSRV:-"www.ring.gr.jp"}
>  MIRRORPATH=${MIRRORPATH:-"/pub/linux/Plamo"}
> -CATEGORIES=${CATEGORIES:-"00_base 01_minimum"}
> -EXTRACTGRS=${EXTRACTGRS:-""}
> -IGNOREPKGS=${IGNOREPKGS:-"grub kernel lilo linux_firmware microcode_ctl
> +CATEGORIES=${CATEGORIES-"00_base 01_minimum"}
> +EXTRACTGRS=${EXTRACTGRS-""}
> +IGNOREPKGS=${IGNOREPKGS-"grub kernel lilo linux_firmware microcode_ctl
>      cpufreqd cpufrequtils gpm"}
> -ADDONPKGS=${ADDONPKGS:-"`echo contrib/Hamradio/{morse,qrq}`"}
> +ADDONPKGS=${ADDONPKGS-"`echo contrib/Hamradio/{morse,qrq}`"}
>  
>  download_plamo() {
>    # check the mini plamo was not already downloaded
> @@ -50,7 +50,7 @@ download_plamo() {
>    cd $ptcache
>    case $DLSCHEME in http) depth=2 ;; ftp) depth=3 ;; esac
>    rej=${IGNOREPKGS%% *} ; [ -n "$rej" ] && rej="$rej-*"
> -  if [ `echo $IGNOREPKGS | wc -w` -ne 1 ] ; then
> +  if [ `echo $IGNOREPKGS | wc -w` -gt 1 ] ; then
>      for p in ${IGNOREPKGS#* } ; do rej="$rej,$p-*" ; done
>    fi
>    for i in $CATEGORIES ; do
> @@ -347,7 +347,7 @@ dlcache=$cache/cache-${prog##*-}-$release-$arch
>  rtcache=$cache/rootfs-${prog##*-}-$release-$arch
>  if [ -z "$rootfs" ] ; then
>    if grep -q "^lxc.rootfs" $path/config ; then
> -    rootfs=$(awk -F= '/^lxc.rootfs =/{ print $2 }' $path/config)
> +    rootfs=`awk -F= '/^lxc.rootfs =/{ print $2 }' $path/config`
>    else
>      rootfs=$path/rootfs
>    fi
> -- 
> 1.8.3.4 (Apple Git-47)
> 
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140122/543222d2/attachment.pgp>


More information about the lxc-devel mailing list