]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
plamo: Improve template
authorKATOH Yasufumi <karma@jazz.email.ne.jp>
Wed, 22 Jan 2014 17:29:42 +0000 (02:29 +0900)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 23 Jan 2014 00:57:53 +0000 (19:57 -0500)
allow not to specify a variable that is related installed packages

Signed-off-by: TAMUKI Shoichi <tamuki@linet.gr.jp>
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
templates/lxc-plamo.in

index c5a02ee4dc813815a3eac72dfd97a38d9791f4e6..dd8d29b4c9da925f12c64a7ce533c77ccc20fb39 100644 (file)
 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