[SCM] debian-live/live-helper branch, master, updated. 1.0_a38-1-4-g2d88de5

Daniel Baumann daniel at debian.org
Tue Feb 26 18:59:38 UTC 2008


The following commit has been merged in the master branch:
commit 2d88de5ab6ade945ac05b2b8f8e244489da62d9f
Author: Daniel Baumann <daniel at debian.org>
Date:   Tue Feb 26 19:57:41 2008 +0100

    Adding option to set binary-net compression (or disable it).

diff --git a/functions/defaults.sh b/functions/defaults.sh
index dd14dac..88a9013 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -590,6 +590,9 @@ Set_defaults ()
 	# Setting net cow filesystem
 	LH_NET_COW_FILESYSTEM="${LH_NET_COW_FILESYSTEM:-nfs}"
 
+	# Setting net tarball
+	LH_NET_TARBALL="gzip"
+
 	# Setting syslinux configuration file
 	# LH_SYSLINUX_CFG
 
diff --git a/helpers/lh_binary_net b/helpers/lh_binary_net
index 3eb8b67..8cd4bf7 100755
--- a/helpers/lh_binary_net
+++ b/helpers/lh_binary_net
@@ -38,6 +38,11 @@ then
 	exit 0
 fi
 
+if [ "${LH_NET_TARBALL}" = "none" ]
+then
+	exit 0
+fi
+
 Echo_message "Begin building binary netboot image..."
 
 # Requiring stage file
@@ -53,10 +58,9 @@ Check_lockfile .lock
 Create_lockfile .lock
 
 # Remove old binary
-if [ -f binary-net.tar.gz ]
-then
-	rm -f binary-net.tar.gz
-fi
+rm -f binary-net.tar.bz2
+rm -f binary-net.tar.gz
+rm -f binary-net.tar
 
 # Creating image file
 ROOT_DIR=$(basename ${LH_NET_ROOT_PATH})
@@ -71,8 +75,24 @@ then
 fi
 
 cd ..
-tar cfz binary-net.tar.gz "$(basename ${OLDPWD})/${ROOT_DIR}" "$(basename ${OLDPWD})/tftpboot"
-mv binary-net.tar.gz "${OLDPWD}"
+
+case "${LH_NET_TARBALL}" in
+	bzip2)
+		tar cfj binary-net-tar.bz2 "$(basename ${OLDPWD})/${ROOT_DIR}" "$(basename ${OLDPWD})/tftpboot"
+		mv binary-net.tar.bz2 "${OLDPWD}"
+		;;
+
+	gzip)
+		tar cfz binary-net.tar.gz "$(basename ${OLDPWD})/${ROOT_DIR}" "$(basename ${OLDPWD})/tftpboot"
+		mv binary-net.tar.gz "${OLDPWD}"
+		;;
+
+	tar)
+		tar cf binary-net.tar "$(basename ${OLDPWD})/${ROOT_DIR}" "$(basename ${OLDPWD})/tftpboot"
+		mv binary-net.tar "${OLDPWD}"
+		;;
+esac
+
 cd "${OLDPWD}"
 
 if [ "${ROOT_DIR}" != "binary" ]
diff --git a/helpers/lh_config b/helpers/lh_config
index bb5a7ac..40690ea 100755
--- a/helpers/lh_config
+++ b/helpers/lh_config
@@ -89,6 +89,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
 \t    [--net-cow-mountoptions OPTIONS]\n\
 \t    [--net-cow-path PATH]\n\
 \t    [--net-cow-server IP|HOSTNAME]\n\
+\t    [--net-tarball bzip2|gzip|tar|none]\n\
 \t    [-p|--packages-lists FILE]\n\
 \t    [--packages PACKAGE|\"PACKAGES\"]\n\
 \t    [--quiet]\n\
@@ -113,7 +114,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
 
 Local_arguments ()
 {
-	ARGUMENTS="$(getopt --longoptions apt:,apt-ftp-proxy:,apt-http-proxy:,apt-pdiffs:,apt-options:,aptitute-options:,apt-pipeline:,apt-recommends:,apt-secure:,bootstrap:,cache:,cache-indices:,cache-packages:,cache-stages:,debconf-frontend:,debconf-nowarnings:,debconf-priority:,genisoimage:,initramfs:,fdisk:,losetup:,mode:,root-command:,use-fakeroot:,tasksel:,includes:,templates:,architecture:,bootstrap-config:,bootstrap-flavour:,bootstrap-keyring:,distribution:,mirror-bootstrap:,mirror-bootstrap-security:,mirror-binary:,mirror-binary-security:,sections:,chroot-filesystem:,union-filesystem:,exposed-root:,hooks:,interactive:,keyring-packages:,language:,linux-flavours:,linux-packages:,packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,binary-filesystem:,binary-images:,binary-indices:,bootappend-install:,bootappend-live:,bootloader:,checksums:,chroot-build:,debian-installer:,debian-installer-daily:,encryption:,grub-splash:,hostname:,iso-application:,iso-preparer:,iso-publisher:,iso-volume:,memtest:,net-root-filesystem:,net-root-mountoptions:,net-root-path:,net-root-server:,net-cow-filesystem:,net-cow-mountoptions:,net-cow-path:,net-cow-server:,syslinux-splash:,syslinux-timeout:,syslinux-menu:,username:,source:,source-images:,breakpoints,conffile:,debug,force,help,quiet,usage,verbose,version --name=${PROGRAM} --options a:f:d:m:l:k:p:b:e:s:c:huv --shell sh -- "${@}")"
+	ARGUMENTS="$(getopt --longoptions apt:,apt-ftp-proxy:,apt-http-proxy:,apt-pdiffs:,apt-options:,aptitute-options:,apt-pipeline:,apt-recommends:,apt-secure:,bootstrap:,cache:,cache-indices:,cache-packages:,cache-stages:,debconf-frontend:,debconf-nowarnings:,debconf-priority:,genisoimage:,initramfs:,fdisk:,losetup:,mode:,root-command:,use-fakeroot:,tasksel:,includes:,templates:,architecture:,bootstrap-config:,bootstrap-flavour:,bootstrap-keyring:,distribution:,mirror-bootstrap:,mirror-bootstrap-security:,mirror-binary:,mirror-binary-security:,sections:,chroot-filesystem:,union-filesystem:,exposed-root:,hooks:,interactive:,keyring-packages:,language:,linux-flavours:,linux-packages:,packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,binary-filesystem:,binary-images:,binary-indices:,bootappend-install:,bootappend-live:,bootloader:,checksums:,chroot-build:,debian-installer:,debian-installer-daily:,encryption:,grub-splash:,hostname:,iso-application:,iso-preparer:,iso-publisher:,iso-volume:,memtest:,net-root-filesystem:,net-root-mountoptions:,net-root-path:,net-root-server:,net-cow-filesystem:,net-cow-mountoptions:,net-cow-path:,net-cow-server:,net-tarball:,syslinux-splash:,syslinux-timeout:,syslinux-menu:,username:,source:,source-images:,breakpoints,conffile:,debug,force,help,quiet,usage,verbose,version --name=${PROGRAM} --options a:f:d:m:l:k:p:b:e:s:c:huv --shell sh -- "${@}")"
 
 	if [ "${?}" != "0" ]
 	then
@@ -549,6 +550,11 @@ Local_arguments ()
 				shift 2
 				;;
 
+			--net-tarball)
+				LH_NET_TARBALL="${2}"
+				shift 2
+				;;
+
 			--syslinux-splash)
 				LH_SYSLINUX_SPLASH="${2}"
 				shift 2
@@ -1040,6 +1046,10 @@ LH_NET_COW_PATH="${LH_NET_COW_PATH}"
 # (Default: ${LH_NET_COW_SERVER})
 LH_NET_COW_SERVER="${LH_NET_COW_SERVER}"
 
+# \$LH_NET_TARBALL: set net tarball
+# (Default: ${LH_NET_TARBALL})
+LH_NET_TARBALL="${LH_NET_TARBALL}"
+
 # \$LH_SYSLINUX_SPLASH: set custom syslinux splash
 # (Default: empty)
 LH_SYSLINUX_SPLASH="${LH_SYSLINUX_SPLASH}"

-- 
debian-live/live-helper



More information about the debian-live-changes mailing list