summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2008-02-26 19:57:41 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:36:13 +0100
commit0c9fc8846d35fff3aa82b80af282cc1aa0c035f3 (patch)
tree69c904a3e4832b505f791e7c7c2d7aa737e25d70 /helpers
parent265e6360d78201256dee0a7b75d7612a21f42b4b (diff)
downloadlive-build-0c9fc8846d35fff3aa82b80af282cc1aa0c035f3.zip
live-build-0c9fc8846d35fff3aa82b80af282cc1aa0c035f3.tar.gz
Adding option to set binary-net compression (or disable it).
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/lh_binary_net32
-rwxr-xr-xhelpers/lh_config12
2 files changed, 37 insertions, 7 deletions
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}"