diff options
author | Daniel Baumann <daniel@debian.org> | 2010-02-18 17:12:59 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:17:04 +0100 |
commit | 9d6a4dedc2736389349345c29d3a8a48b7b70692 (patch) | |
tree | b227ffc3d77fcd3ba49dabbda5e2674c43f8bea3 | |
parent | 2dc16bc40d06c08030dc86b736d169a9cd65f791 (diff) | |
download | live-build-9d6a4dedc2736389349345c29d3a8a48b7b70692.zip live-build-9d6a4dedc2736389349345c29d3a8a48b7b70692.tar.gz |
Cleaning up usb helpers for a future usb-zip addition.
-rwxr-xr-x | functions/defaults.sh | 40 | ||||
-rwxr-xr-x | helpers/binary | 2 | ||||
-rwxr-xr-x | helpers/binary_debian-installer | 14 | ||||
-rwxr-xr-x | helpers/binary_disk | 2 | ||||
-rwxr-xr-x | helpers/binary_grub | 4 | ||||
-rwxr-xr-x | helpers/binary_grub2 | 4 | ||||
-rwxr-xr-x | helpers/binary_includes | 17 | ||||
-rwxr-xr-x | helpers/binary_local-includes | 9 | ||||
-rwxr-xr-x | helpers/binary_silo | 4 | ||||
-rwxr-xr-x | helpers/binary_syslinux | 8 | ||||
-rwxr-xr-x | helpers/binary_usb (renamed from helpers/binary_usb-hdd) | 8 | ||||
-rwxr-xr-x | helpers/binary_yaboot | 19 | ||||
-rwxr-xr-x | helpers/source | 2 | ||||
-rwxr-xr-x | helpers/source_usb (renamed from helpers/source_usb-hdd) | 8 | ||||
-rw-r--r-- | manpages/lh_binary_usb.en.1 (renamed from manpages/lh_binary_usb-hdd.en.1) | 0 | ||||
-rw-r--r-- | manpages/lh_source_usb.en.1 (renamed from manpages/lh_source_usb-hdd.en.1) | 0 | ||||
-rw-r--r-- | manpages/live-helper.en.7 | 4 | ||||
-rw-r--r-- | manpages/po4a/de/lh_binary_usb.en.1.po (renamed from manpages/po4a/de/lh_binary_usb-hdd.en.1.po) | 0 | ||||
-rw-r--r-- | manpages/po4a/de/lh_source_usb.en.1.po (renamed from manpages/po4a/de/lh_source_usb-hdd.en.1.po) | 0 | ||||
-rw-r--r-- | manpages/po4a/fr/lh_binary_usb.en.1.po (renamed from manpages/po4a/fr/lh_binary_usb-hdd.en.1.po) | 0 | ||||
-rw-r--r-- | manpages/po4a/fr/lh_source_usb.en.1.po (renamed from manpages/po4a/fr/lh_source_usb-hdd.en.1.po) | 0 | ||||
-rw-r--r-- | manpages/po4a/pot/lh_binary_usb.en.1.pot (renamed from manpages/po4a/pot/lh_binary_usb-hdd.en.1.pot) | 0 | ||||
-rw-r--r-- | manpages/po4a/pot/lh_source_usb.en.1.pot (renamed from manpages/po4a/pot/lh_source_usb-hdd.en.1.pot) | 0 |
23 files changed, 77 insertions, 68 deletions
diff --git a/functions/defaults.sh b/functions/defaults.sh index fab7cfa..a5712b7 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -757,7 +757,7 @@ Set_defaults () _LH_BOOTAPPEND_PRESEED="file=/cdrom/install/${LH_DEBIAN_INSTALLER_PRESEEDFILE}" ;; - usb-hdd) + usb*) if [ "${LH_MODE}" = "ubuntu" ] || [ "${LH_DEBIAN_INSTALLER}" = "live" ] then _LH_BOOTAPPEND_PRESEED="file=/cdrom/install/${LH_DEBIAN_INSTALLER_PRESEEDFILE}" @@ -780,14 +780,15 @@ Set_defaults () esac fi - if [ "${LH_BINARY_IMAGES}" = "usb-hdd" ] - then - # Try USB block devices for install media - if ! echo "${LH_BOOTAPPEND_INSTALL}" | grep -q try-usb - then - LH_BOOTAPPEND_INSTALL="cdrom-detect/try-usb=true ${LH_BOOTAPPEND_INSTALL}" - fi - fi + case "${LH_BINARY_IMAGES}" in + usb*) + # Try USB block devices for install media + if ! echo "${LH_BOOTAPPEND_INSTALL}" | grep -q try-usb + then + LH_BOOTAPPEND_INSTALL="cdrom-detect/try-usb=true ${LH_BOOTAPPEND_INSTALL}" + fi + ;; + esac if [ -n ${_LH_BOOTAPPEND_PRESEED} ] then @@ -1028,16 +1029,17 @@ Check_defaults () esac fi - if [ "${LH_BINARY_IMAGES}" = "usb-hdd" ] - then - # grub or yaboot + usb-hdd - case "${LH_BOOTLOADER}" in - grub|yaboot) - Echo_error "You have selected a combination of bootloader and image type that is currently not supported by live-helper. Please use either another bootloader or a different image type." - exit 1 - ;; - esac - fi + case "${LH_BINARY_IMAGES}" in + usb*) + # grub or yaboot + usb + case "${LH_BOOTLOADER}" in + grub|yaboot) + Echo_error "You have selected a combination of bootloader and image type that is currently not supported by live-helper. Please use either another bootloader or a different image type." + exit 1 + ;; + esac + ;; + esac if [ "$(echo ${LH_ISO_APPLICATION} | wc -c)" -gt 128 ] then diff --git a/helpers/binary b/helpers/binary index b0f81ae..234d898 100755 --- a/helpers/binary +++ b/helpers/binary @@ -78,7 +78,7 @@ fi lh binary_iso ${*} lh binary_net ${*} lh binary_tar ${*} -lh binary_usb-hdd ${*} +lh binary_usb ${*} lh binary_virtual-hdd ${*} if [ "${LH_CHROOT_BUILD}" = "true" ] diff --git a/helpers/binary_debian-installer b/helpers/binary_debian-installer index cb1af38..d525ca6 100755 --- a/helpers/binary_debian-installer +++ b/helpers/binary_debian-installer @@ -83,7 +83,7 @@ case "${LH_BINARY_IMAGES}" in DESTDIR="tftpboot/debian-install/${LH_ARCHITECTURE}" ;; - tar|usb-hdd) + usb*|tar) DESTDIR="binary/install" ;; @@ -601,10 +601,14 @@ EOF ln -s ${LH_DEBIAN_INSTALLER_DISTRIBUTION} binary/dists/${DISTRIBUTION} done - if [ "${LH_BINARY_IMAGES}" != "usb-hdd" ] - then - ln -s . binary/debian - fi + case "${LH_BINARY_IMAGES}" in + usb*) + ;; + + *) + ln -s . binary/debian + ;; + esac # Including preseeding files if Find_files config/binary_debian-installer/*.cfg diff --git a/helpers/binary_disk b/helpers/binary_disk index 2bbd73d..8116734 100755 --- a/helpers/binary_disk +++ b/helpers/binary_disk @@ -24,7 +24,7 @@ Read_conffiles config/all config/common config/bootstrap config/chroot config/bi Set_defaults case "${LH_BINARY_IMAGES}" in - iso|usb-hdd) + iso|usb*) ;; *) exit 0 diff --git a/helpers/binary_grub b/helpers/binary_grub index 35fa43d..b3f9ba1 100755 --- a/helpers/binary_grub +++ b/helpers/binary_grub @@ -142,7 +142,7 @@ case "${LH_BINARY_IMAGES}" in DESTDIR_INSTALL="binary/install" ;; - usb-hdd|net) + usb*|net) Echo_warning "Bootloader in this image type not yet supported by live-helper." Echo_warning "This would produce a not bootable image, aborting (FIXME)." exit 1 @@ -280,7 +280,7 @@ case ${LH_BINARY_IMAGES} in FILES="chroot/usr/lib/grub/*/stage2_eltorito" ;; - tar|usb-hdd) + usb*|tar) FILES="chroot/usr/lib/grub/*/stage1 chroot/usr/lib/grub/*/e2fs_stage1_5 chroot/usr/lib/grub/*/stage2" ;; esac diff --git a/helpers/binary_grub2 b/helpers/binary_grub2 index 76b9373..0cf0618 100755 --- a/helpers/binary_grub2 +++ b/helpers/binary_grub2 @@ -116,7 +116,7 @@ case "${LH_BINARY_IMAGES}" in DESTDIR_INSTALL="binary/install" ;; - usb-hdd|net) + usb*|net) Echo_warning "Bootloader in this image type not yet supported by live-helper." Echo_warning "This would produce a not bootable image, aborting (FIXME)." exit 1 @@ -253,7 +253,7 @@ case ${LH_BINARY_IMAGES} in FILES="chroot/usr/lib/grub/i386-pc/*.mod chroot/usr/lib/grub/i386-pc/*.lst chroot/usr/lib/grub/i386-pc/efiemu??.o chroot/usr/share/grub/*.pf2" ;; - tar|usb-hdd) + usb*|tar) FILES="chroot/usr/lib/grub/i386-pc/*" ;; esac diff --git a/helpers/binary_includes b/helpers/binary_includes index 196f902..e37f4df 100755 --- a/helpers/binary_includes +++ b/helpers/binary_includes @@ -80,14 +80,15 @@ case "${LH_ARCHITECTURE}" in esac # Working arround vfat limitations -if [ "${LH_BINARY_IMAGE}" = "usb-hdd" ] -then - case "${LH_BINARY_FILESYSTEM}" in - fat*) - CP_OPTIONS="-L" - ;; - esac -fi +case "${LH_BINARY_IMAGES}" in + usb*) + case "${LH_BINARY_FILESYSTEM}" in + fat*) + CP_OPTIONS="-L" + ;; + esac + ;; +esac # Copying common templates if [ -d "${LH_INCLUDES}"/"${LH_DISTRIBUTION}"/common ] && \ diff --git a/helpers/binary_local-includes b/helpers/binary_local-includes index 63986ae..44f93c9 100755 --- a/helpers/binary_local-includes +++ b/helpers/binary_local-includes @@ -45,10 +45,11 @@ then cd "${OLDPWD}" # Removing symlinks - if [ "${LH_BINARY_IMAGES}" = "usb-hdd" ] - then - find binary -type l | xargs rm -f - fi + case "${LH_BINARY_IMAGES}" in + usb*) + find binary -type l | xargs rm -f + ;; + esac # Creating stage file Create_stagefile .stage/binary_local-includes diff --git a/helpers/binary_silo b/helpers/binary_silo index d79d0b7..df7ee10 100755 --- a/helpers/binary_silo +++ b/helpers/binary_silo @@ -30,7 +30,7 @@ fi # Check image type case "${LH_BINARY_IMAGES}" in - iso|usb-hdd|tar) + iso|usb*|tar) ;; net) @@ -225,7 +225,7 @@ fi LINUX_INSTALL="$(/bin/echo ${LINUX_INSTALL} | sed -e 's|binary||g' -e 's|//|/|g')" case "${LH_BINARY_IMAGES}" in - iso|usb-hdd) + iso|usb*) # Copying silo mkdir -p binary/boot diff --git a/helpers/binary_syslinux b/helpers/binary_syslinux index ba7f9d5..9d4cab1 100755 --- a/helpers/binary_syslinux +++ b/helpers/binary_syslinux @@ -90,7 +90,7 @@ Syslinux_live_entry () APPEND="${5}" case "${LH_BINARY_IMAGES}" in - iso|usb-hdd) + iso|usb*) NUMBER="$(ls -1 ${KERNEL_PATH} | grep 'vmlinuz[0-9]\+$' | wc -l)" NUMBER="$((${NUMBER} +1))" @@ -334,7 +334,7 @@ Configure_syslinux_templates () done case "${LH_BINARY_IMAGES}" in - usb-hdd) + usb*) if [ -f "${SYSLINUX_PATH}/exithelp.cfg" ] then sed -i -e "s|config isolinux.cfg|config syslinux.cfg|" "${SYSLINUX_PATH}"/exithelp.cfg @@ -387,7 +387,7 @@ case "${LH_BINARY_IMAGES}" in MEDIA="netboot" ;; - tar|usb-hdd) + usb*|tar) SYSLINUX_PATH="binary/syslinux" KERNEL_PATH="binary/${INITFS}" SCREEN_PATH="${SYSLINUX_PATH}" @@ -631,7 +631,7 @@ case "${LH_BINARY_IMAGES}" in fi ;; - tar|usb-hdd) + usb*|tar) case "${LH_CHROOT_BUILD}" in true) cp chroot/usr/lib/syslinux/isolinux.bin ${SCREEN_PATH}/syslinux.bin diff --git a/helpers/binary_usb-hdd b/helpers/binary_usb index 53d9e37..59aae15 100755 --- a/helpers/binary_usb-hdd +++ b/helpers/binary_usb @@ -1,6 +1,6 @@ #!/bin/sh -# lh_binary_usb-hdd(1) - build binary usb-hdd image +# lh_binary_usb(1) - build binary usb image # Copyright (C) 2006-2009 Daniel Baumann <daniel@debian.org> # # live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING. @@ -28,13 +28,13 @@ then exit 0 fi -Echo_message "Begin building binary usb-hdd image..." +Echo_message "Begin building binary usb image..." # Requiring stage file Require_stagefile .stage/config .stage/bootstrap .stage/chroot_proc # Checking stage file -Check_stagefile .stage/binary_usb-hdd +Check_stagefile .stage/binary_usb # Checking lock file Check_lockfile .lock @@ -277,4 +277,4 @@ Save_cache cache/packages_binary Remove_package # Creating stage file -Create_stagefile .stage/binary_usb-hdd +Create_stagefile .stage/binary_usb diff --git a/helpers/binary_yaboot b/helpers/binary_yaboot index fdd857d..ef44e6e 100755 --- a/helpers/binary_yaboot +++ b/helpers/binary_yaboot @@ -149,7 +149,7 @@ case "${LH_BINARY_IMAGES}" in DESTDIR_INSTALL="binary/install" ;; - net|tar|usb-hdd) + usb*|net|tar) Echo_error "not yet supported, aborting (FIXME)." exit 1 ;; @@ -272,7 +272,7 @@ fi LINUX_INSTALL="$(/bin/echo ${LINUX_INSTALL} | sed -e 's|binary||g' -e 's|//|/|g')" case "${LH_BINARY_IMAGES}" in - iso|usb-hdd) + iso|usb*) # Copying yaboot mkdir -p binary/yaboot @@ -288,13 +288,14 @@ case "${LH_BINARY_IMAGES}" in cp -r "${TEMPLATES}"/* binary/yaboot - if [ "${LH_BINARY_IMAGES}" = "usb-hdd" ] - then - mv binary/yaboot/yaboot.conf binary/yaboot/yaboot.conf.tmp - echo "root=/dev/ram" > binary/yaboot/yaboot.conf - cat binary/yaboot/yaboot.conf.tmp >> binary/yaboot/yaboot.conf - rm -f binary/yaboot/yaboot.conf.tmp - fi + case "${LH_BINARY_IMAGES}" in + usb*) + mv binary/yaboot/yaboot.conf binary/yaboot/yaboot.conf.tmp + echo "root=/dev/ram" > binary/yaboot/yaboot.conf + cat binary/yaboot/yaboot.conf.tmp >> binary/yaboot/yaboot.conf + rm -f binary/yaboot/yaboot.conf.tmp + ;; + esac # Configure yaboot templates sed -i -e "s|LINUX_LIVE|${LINUX_LIVE}|" -e "s|LINUX_INSTALL|${LINUX_INSTALL}|" binary/yaboot/yaboot.conf diff --git a/helpers/source b/helpers/source index 8d11c44..1783216 100755 --- a/helpers/source +++ b/helpers/source @@ -44,7 +44,7 @@ lh source_md5sum ${*} lh source_iso ${*} lh source_net ${*} lh source_tar ${*} -lh source_usb-hdd ${*} +lh source_usb ${*} lh source_virtual-hdd ${*} # Deconfiguring chroot diff --git a/helpers/source_usb-hdd b/helpers/source_usb index e8cd8ca..6065382 100755 --- a/helpers/source_usb-hdd +++ b/helpers/source_usb @@ -1,6 +1,6 @@ #!/bin/sh -# lh_source_usb-hdd(1) - build source usb-hdd image +# lh_source_usb(1) - build source usb image # Copyright (C) 2006-2009 Daniel Baumann <daniel@debian.org> # # live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING. @@ -33,13 +33,13 @@ then exit 0 fi -Echo_message "Begin building source usb-hdd image..." +Echo_message "Begin building source usb image..." # Requiring stage file Require_stagefile .stage/config .stage/source_debian # Checking stage file -Check_stagefile .stage/source_usb-hdd +Check_stagefile .stage/source_usb # Checking lock file Check_lockfile .lock @@ -136,4 +136,4 @@ fi Remove_package # Creating stage file -Create_stagefile .stage/source_usb-hdd +Create_stagefile .stage/source_usb diff --git a/manpages/lh_binary_usb-hdd.en.1 b/manpages/lh_binary_usb.en.1 index 87290d9..87290d9 100644 --- a/manpages/lh_binary_usb-hdd.en.1 +++ b/manpages/lh_binary_usb.en.1 diff --git a/manpages/lh_source_usb-hdd.en.1 b/manpages/lh_source_usb.en.1 index 716656c..716656c 100644 --- a/manpages/lh_source_usb-hdd.en.1 +++ b/manpages/lh_source_usb.en.1 diff --git a/manpages/live-helper.en.7 b/manpages/live-helper.en.7 index 1ef64c9..dba08f1 100644 --- a/manpages/live-helper.en.7 +++ b/manpages/live-helper.en.7 @@ -189,7 +189,7 @@ installs silo into binary installs syslinux into binary .IP "\fBlh_binary_tar\fR(1)" 4 build harddisk binary image -.IP "\fBlh_binary_usb-hdd\fR(1)" 4 +.IP "\fBlh_binary_usb\fR(1)" 4 build binary usb-hdd image .IP "\fBlh_binary_virtual-hdd\fR(1)" 4 build binary virtual-hdd image @@ -212,7 +212,7 @@ create source md5sum build source net image .IP "\fBlh_source_tar\fR(1)" 4 build source tarball -.IP "\fBlh_source_usb-hdd\fR(1)" 4 +.IP "\fBlh_source_usb\fR(1)" 4 build source usb-hdd image .IP "\fBlh_source_virtual-hdd\fR(1)" 4 build source virtual-hdd image diff --git a/manpages/po4a/de/lh_binary_usb-hdd.en.1.po b/manpages/po4a/de/lh_binary_usb.en.1.po index 59dfcde..59dfcde 100644 --- a/manpages/po4a/de/lh_binary_usb-hdd.en.1.po +++ b/manpages/po4a/de/lh_binary_usb.en.1.po diff --git a/manpages/po4a/de/lh_source_usb-hdd.en.1.po b/manpages/po4a/de/lh_source_usb.en.1.po index 66d4612..66d4612 100644 --- a/manpages/po4a/de/lh_source_usb-hdd.en.1.po +++ b/manpages/po4a/de/lh_source_usb.en.1.po diff --git a/manpages/po4a/fr/lh_binary_usb-hdd.en.1.po b/manpages/po4a/fr/lh_binary_usb.en.1.po index 0868666..0868666 100644 --- a/manpages/po4a/fr/lh_binary_usb-hdd.en.1.po +++ b/manpages/po4a/fr/lh_binary_usb.en.1.po diff --git a/manpages/po4a/fr/lh_source_usb-hdd.en.1.po b/manpages/po4a/fr/lh_source_usb.en.1.po index 7e50606..7e50606 100644 --- a/manpages/po4a/fr/lh_source_usb-hdd.en.1.po +++ b/manpages/po4a/fr/lh_source_usb.en.1.po diff --git a/manpages/po4a/pot/lh_binary_usb-hdd.en.1.pot b/manpages/po4a/pot/lh_binary_usb.en.1.pot index 2459289..2459289 100644 --- a/manpages/po4a/pot/lh_binary_usb-hdd.en.1.pot +++ b/manpages/po4a/pot/lh_binary_usb.en.1.pot diff --git a/manpages/po4a/pot/lh_source_usb-hdd.en.1.pot b/manpages/po4a/pot/lh_source_usb.en.1.pot index 9e9cc00..9e9cc00 100644 --- a/manpages/po4a/pot/lh_source_usb-hdd.en.1.pot +++ b/manpages/po4a/pot/lh_source_usb.en.1.pot |