mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-16 05:47:31 +00:00
plamo: Improve template
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>
This commit is contained in:
parent
6eaac3034e
commit
8c3a756ed4
@ -33,11 +33,11 @@
|
|||||||
DLSCHEME=${DLSCHEME:-"http"}
|
DLSCHEME=${DLSCHEME:-"http"}
|
||||||
MIRRORSRV=${MIRRORSRV:-"www.ring.gr.jp"}
|
MIRRORSRV=${MIRRORSRV:-"www.ring.gr.jp"}
|
||||||
MIRRORPATH=${MIRRORPATH:-"/pub/linux/Plamo"}
|
MIRRORPATH=${MIRRORPATH:-"/pub/linux/Plamo"}
|
||||||
CATEGORIES=${CATEGORIES:-"00_base 01_minimum"}
|
CATEGORIES=${CATEGORIES-"00_base 01_minimum"}
|
||||||
EXTRACTGRS=${EXTRACTGRS:-""}
|
EXTRACTGRS=${EXTRACTGRS-""}
|
||||||
IGNOREPKGS=${IGNOREPKGS:-"grub kernel lilo linux_firmware microcode_ctl
|
IGNOREPKGS=${IGNOREPKGS-"grub kernel lilo linux_firmware microcode_ctl
|
||||||
cpufreqd cpufrequtils gpm"}
|
cpufreqd cpufrequtils gpm"}
|
||||||
ADDONPKGS=${ADDONPKGS:-"`echo contrib/Hamradio/{morse,qrq}`"}
|
ADDONPKGS=${ADDONPKGS-"`echo contrib/Hamradio/{morse,qrq}`"}
|
||||||
|
|
||||||
download_plamo() {
|
download_plamo() {
|
||||||
# check the mini plamo was not already downloaded
|
# check the mini plamo was not already downloaded
|
||||||
@ -50,7 +50,7 @@ download_plamo() {
|
|||||||
cd $ptcache
|
cd $ptcache
|
||||||
case $DLSCHEME in http) depth=2 ;; ftp) depth=3 ;; esac
|
case $DLSCHEME in http) depth=2 ;; ftp) depth=3 ;; esac
|
||||||
rej=${IGNOREPKGS%% *} ; [ -n "$rej" ] && rej="$rej-*"
|
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
|
for p in ${IGNOREPKGS#* } ; do rej="$rej,$p-*" ; done
|
||||||
fi
|
fi
|
||||||
for i in $CATEGORIES ; do
|
for i in $CATEGORIES ; do
|
||||||
@ -347,7 +347,7 @@ dlcache=$cache/cache-${prog##*-}-$release-$arch
|
|||||||
rtcache=$cache/rootfs-${prog##*-}-$release-$arch
|
rtcache=$cache/rootfs-${prog##*-}-$release-$arch
|
||||||
if [ -z "$rootfs" ] ; then
|
if [ -z "$rootfs" ] ; then
|
||||||
if grep -q "^lxc.rootfs" $path/config ; 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
|
else
|
||||||
rootfs=$path/rootfs
|
rootfs=$path/rootfs
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user