summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/lh_binary_chroot2
-rwxr-xr-xhelpers/lh_binary_debian-installer44
-rwxr-xr-xhelpers/lh_binary_disk18
-rwxr-xr-xhelpers/lh_binary_grub30
-rwxr-xr-xhelpers/lh_binary_includes12
-rwxr-xr-xhelpers/lh_binary_net10
-rwxr-xr-xhelpers/lh_binary_rootfs12
-rwxr-xr-xhelpers/lh_binary_syslinux72
-rwxr-xr-xhelpers/lh_binary_usb-hdd12
-rwxr-xr-xhelpers/lh_binary_yaboot24
-rwxr-xr-xhelpers/lh_bootstrap_cache4
-rwxr-xr-xhelpers/lh_bootstrap_cdebootstrap4
-rwxr-xr-xhelpers/lh_bootstrap_copy2
-rwxr-xr-xhelpers/lh_bootstrap_debootstrap4
-rwxr-xr-xhelpers/lh_chroot_cache4
-rwxr-xr-xhelpers/lh_chroot_hacks4
-rwxr-xr-xhelpers/lh_chroot_local-hooks8
-rwxr-xr-xhelpers/lh_chroot_local-packageslists8
-rwxr-xr-xhelpers/lh_chroot_sources12
-rwxr-xr-xhelpers/lh_chroot_sysvinit2
-rwxr-xr-xhelpers/lh_config4
-rwxr-xr-xhelpers/lh_losetup8
-rwxr-xr-xhelpers/lh_source_debian6
-rwxr-xr-xhelpers/lh_source_debian-live2
-rwxr-xr-xhelpers/lh_source_disk12
-rwxr-xr-xhelpers/lh_source_usb-hdd6
-rwxr-xr-xhelpers/lh_testroot2
27 files changed, 164 insertions, 164 deletions
diff --git a/helpers/lh_binary_chroot b/helpers/lh_binary_chroot
index c40afc998..f6615e1c2 100755
--- a/helpers/lh_binary_chroot
+++ b/helpers/lh_binary_chroot
@@ -80,7 +80,7 @@ ${LH_ROOT_COMMAND} mv chroot.tmp chroot/chroot
if [ -n "${LH_ROOT_COMMAND}" ]
then
- ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` chroot
+ ${LH_ROOT_COMMAND} chown -R $(whoami):$(whoami) chroot
fi
# Creating stage file
diff --git a/helpers/lh_binary_debian-installer b/helpers/lh_binary_debian-installer
index 6ad8e7b6a..056d89d4c 100755
--- a/helpers/lh_binary_debian-installer
+++ b/helpers/lh_binary_debian-installer
@@ -232,20 +232,20 @@ if [ -d cache/packages_bootstrap ]
then
for FILE in cache/packages_bootstrap/*.deb binary.deb/archives/*.deb
do
- SOURCE="`dpkg -f ${FILE} Source | awk '{ print $1 }'`"
+ SOURCE="$(dpkg -f ${FILE} Source | awk '{ print $1 }')"
if [ -z "${SOURCE}" ]
then
- SOURCE="`basename ${FILE} | awk -F_ '{ print $1 }'`"
+ SOURCE="$(basename ${FILE} | awk -F_ '{ print $1 }')"
fi
case "${SOURCE}" in
lib?*)
- LETTER="`echo ${SOURCE} | sed 's/\(....\).*/\1/'`"
+ LETTER="$(echo ${SOURCE} | sed 's/\(....\).*/\1/')"
;;
*)
- LETTER="`echo ${SOURCE} | sed 's/\(.\).*/\1/'`"
+ LETTER="$(echo ${SOURCE} | sed 's/\(.\).*/\1/')"
;;
esac
@@ -265,20 +265,20 @@ if ls ../config/binary_local-debs/*.deb > /dev/null 2>&1
then
for FILE in ../config/binary_local-debs/*_"${LH_ARCHITECTURE}".deb ../config/binary_local-debs/*_all.deb
do
- SOURCE="`dpkg -f ${FILE} Source | awk '{ print $1 }'`"
+ SOURCE="$(dpkg -f ${FILE} Source | awk '{ print $1 }')"
if [ -z "${SOURCE}" ]
then
- SOURCE="`basename ${FILE} | awk -F_ '{ print $1 }'`"
+ SOURCE="$(basename ${FILE} | awk -F_ '{ print $1 }')"
fi
case "${SOURCE}" in
lib?*)
- LETTER="`echo ${SOURCE} | sed 's/\(....\).*/\1/'`"
+ LETTER="$(echo ${SOURCE} | sed 's/\(....\).*/\1/')"
;;
*)
- LETTER="`echo ${SOURCE} | sed 's/\(.\).*/\1/'`"
+ LETTER="$(echo ${SOURCE} | sed 's/\(.\).*/\1/')"
;;
esac
@@ -309,15 +309,15 @@ wget ${WGET_OPTIONS} "${LH_MIRROR_BOOTSTRAP}"/dists/"${LH_DISTRIBUTION}"/main/de
gunzip -c Packages.gz > Packages
# Sorting udebs
-UDEBS="`awk '/Filename: / { print $2 }' Packages`"
+UDEBS="$(awk '/Filename: / { print $2 }' Packages)"
# Downloading udebs
for UDEB in ${UDEBS}
do
- if [ -f ../cache/packages_debian-installer.udeb/"`basename ${UDEB}`" ]
+ if [ -f ../cache/packages_debian-installer.udeb/"$(basename ${UDEB})" ]
then
# Copying cached udebs
- cp ../cache/packages_debian-installer.udeb/"`basename ${UDEB}`" ./
+ cp ../cache/packages_debian-installer.udeb/"$(basename ${UDEB})" ./
else
# Downloading udebs
wget ${WGET_OPTIONS} "${LH_MIRROR_BOOTSTRAP}"/${UDEB}
@@ -334,20 +334,20 @@ if ls ../config/binary_local-udebs/*.udeb > /dev/null 2>&1
then
for FILE in ../config/binary_local-udebs/*_"${LH_ARCHITECTURE}".udeb ../config/binary_local-udebs/*_all.udeb
do
- SOURCE="`dpkg -f ${FILE} Source | awk '{ print $1 }'`"
+ SOURCE="$(dpkg -f ${FILE} Source | awk '{ print $1 }')"
if [ -z "${SOURCE}" ]
then
- SOURCE="`basename ${FILE} | awk -F_ '{ print $1 }'`"
+ SOURCE="$(basename ${FILE} | awk -F_ '{ print $1 }')"
fi
case "${SOURCE}" in
lib?*)
- LETTER="`echo ${SOURCE} | sed 's/\(....\).*/\1/'`"
+ LETTER="$(echo ${SOURCE} | sed 's/\(....\).*/\1/')"
;;
*)
- LETTER="`echo ${SOURCE} | sed 's/\(.\).*/\1/'`"
+ LETTER="$(echo ${SOURCE} | sed 's/\(.\).*/\1/')"
;;
esac
@@ -358,7 +358,7 @@ then
cp "${FILE}" pool/main/"${LETTER}"/"${SOURCE}"
# Prefere local udebs over downloaded udebs
- rm -f "`basename ${FILE} | awk -F_ '{ print $1 }'`"_*.udeb
+ rm -f "$(basename ${FILE} | awk -F_ '{ print $1 }')"_*.udeb
done
fi
@@ -373,7 +373,7 @@ then
cat ../config/binary_debian-installer/udeb_exclude >> exclude
fi
-for EXCLUDE in `cat exclude`
+for EXCLUDE in $(cat exclude)
do
rm -f "${EXCLUDE}"_*.udeb
done
@@ -391,10 +391,10 @@ fi
# Moving udebs
for UDEB in ${UDEBS}
do
- if [ -f "`basename ${UDEB}`" ]
+ if [ -f "$(basename ${UDEB})" ]
then
- mkdir -p `dirname ${UDEB}`
- mv "`basename ${UDEB}`" "`dirname ${UDEB}`"
+ mkdir -p $(dirname ${UDEB})
+ mv "$(basename ${UDEB})" "$(dirname ${UDEB})"
fi
done
@@ -417,10 +417,10 @@ apt-ftparchive \
-o APT::FTPArchive::Release::Suite="${LH_DISTRIBUTION}" \
-o APT::FTPArchive::Release::Version="4.0" \
-o APT::FTPArchive::Release::Codename="${LH_DISTRIBUTION}" \
- -o APT::FTPArchive::Release::Date="`date -R`" \
+ -o APT::FTPArchive::Release::Date="$(date -R)" \
-o APT::FTPArchive::Release::Architectures="${LH_ARCHITECTURE}" \
-o APT::FTPArchive::Release::Components="main" \
- -o APT::FTPArchive::Release::Description="Last updated: `date -R`" \
+ -o APT::FTPArchive::Release::Description="Last updated: $(date -R)" \
release binary/dists/${LH_DISTRIBUTION} > binary/dists/${LH_DISTRIBUTION}/Release
# Creating dist symlinks
diff --git a/helpers/lh_binary_disk b/helpers/lh_binary_disk
index 99d3117dd..26905e6cd 100755
--- a/helpers/lh_binary_disk
+++ b/helpers/lh_binary_disk
@@ -54,10 +54,10 @@ Create_lockfile .lock
mkdir -p binary/.disk
-ARCHITECTURE="`echo ${LH_ARCHITECTURE} | sed -e 's# #/#g'`"
-DISTRIBUTION="`echo ${LH_DISTRIBUTION} | cut -b 1 | tr '[a-z]' '[A-Z]'`"
-DISTRIBUTION="${DISTRIBUTION}`echo ${LH_DISTRIBUTION} | cut -b 2-`"
-eval VERSION="$`echo VERSION_${LH_DISTRIBUTION}`"
+ARCHITECTURE="$(echo ${LH_ARCHITECTURE} | sed -e 's# #/#g')"
+DISTRIBUTION="$(echo ${LH_DISTRIBUTION} | cut -b 1 | tr '[a-z]' '[A-Z]')"
+DISTRIBUTION="${DISTRIBUTION}$(echo ${LH_DISTRIBUTION} | cut -b 2-)"
+eval VERSION="$$(echo VERSION_${LH_DISTRIBUTION})"
if [ "${LH_DISTRIBUTION}" != "etch" ]
then
@@ -74,7 +74,7 @@ case "${LH_MODE}" in
echo "full_cd" > binary/.disk/cd_type
- echo "Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} CD Binary `date +%Y%m%d-%H:%M`" > binary/.disk/info
+ echo "Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} CD Binary $(date +%Y%m%d-%H:%M)" > binary/.disk/info
cp "${LH_BASE}"/data/debian-cd/${LH_DISTRIBUTION}/${LH_ARCHITECTURE}_udeb_include binary/.disk/udeb_include
;;
@@ -86,7 +86,7 @@ case "${LH_MODE}" in
echo "not_complete" > binary/.disk/cd_type
- echo "Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} NETINST Binary `date +%Y%m%d-%H:%M`" > binary/.disk/info
+ echo "Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} NETINST Binary $(date +%Y%m%d-%H:%M)" > binary/.disk/info
cp "${LH_BASE}"/data/debian-cd/${LH_DISTRIBUTION}/${LH_ARCHITECTURE}_netinst_udeb_include binary/.disk/udeb_include
@@ -101,20 +101,20 @@ case "${LH_MODE}" in
echo "not_complete" > binary/.disk/cd_type
- echo "Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} BC Binary `date +%Y%m%d-%H:%M`" > binary/.disk/info
+ echo "Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} BC Binary $(date +%Y%m%d-%H:%M)" > binary/.disk/info
cp "${LH_BASE}"/data/debian-cd/${LH_DISTRIBUTION}/${LH_ARCHITECTURE}_businesscard_udeb_include binary/.disk/udeb_include
;;
disabled)
- echo "Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} LIVE Binary `date +%Y%m%d-%H:%M`" > binary/.disk/info
+ echo "Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} LIVE Binary $(date +%Y%m%d-%H:%M)" > binary/.disk/info
;;
esac
;;
ubuntu)
# FIXME
- echo "Ubuntu Linux ${VERSION} \"${DISTRIBUTION}\" - Unofficial ${ARCHITECTURE} LIVE/NETINST Binary `date +%Y%m%d-%H:%M`" > binary/.disk/info
+ echo "Ubuntu Linux ${VERSION} \"${DISTRIBUTION}\" - Unofficial ${ARCHITECTURE} LIVE/NETINST Binary $(date +%Y%m%d-%H:%M)" > binary/.disk/info
# Ubuntu 7.04 "Feisty Fawn" - Release i386 (20070418)
;;
esac
diff --git a/helpers/lh_binary_grub b/helpers/lh_binary_grub
index 26f6b8f8d..218fb065c 100755
--- a/helpers/lh_binary_grub
+++ b/helpers/lh_binary_grub
@@ -177,7 +177,7 @@ then
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} union=${LH_UNION_FILESYSTEM}"
fi
-LH_BOOTAPPEND_LIVE="`echo ${LH_BOOTAPPEND_LIVE} | sed -e 's/ //'`"
+LH_BOOTAPPEND_LIVE="$(echo ${LH_BOOTAPPEND_LIVE} | sed -e 's/ //')"
# Parameters are listed at: linux/Documentation/kernel-parameters.txt
FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=normal"
@@ -185,22 +185,22 @@ FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=normal"
# Assembling kernel configuration
# Default entries
-DEFAULT_FLAVOUR="`echo ${LH_LINUX_FLAVOURS} | awk '{ print $1 }'`"
-DEFAULT_KERNEL="`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`"
-DEFAULT_INITRD="initrd.img-`echo ${DEFAULT_KERNEL} | sed -e 's/vmlinuz-//'`"
+DEFAULT_FLAVOUR="$(echo ${LH_LINUX_FLAVOURS} | awk '{ print $1 }')"
+DEFAULT_KERNEL="$(basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR})"
+DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's/vmlinuz-//')"
-Grub_live_entry "live" "`basename ${DESTDIR_LIVE}`/${DEFAULT_KERNEL}" "`basename ${DESTDIR_LIVE}`/${DEFAULT_INITRD}"
-Grub_live_entry "live (fail-safe mode)" "`basename ${DESTDIR_LIVE}`/${DEFAULT_KERNEL}" "`basename ${DESTDIR_LIVE}`/${DEFAULT_INITRD}" "${FAILSAFE}"
+Grub_live_entry "live" "$(basename ${DESTDIR_LIVE})/${DEFAULT_KERNEL}" "$(basename ${DESTDIR_LIVE})/${DEFAULT_INITRD}"
+Grub_live_entry "live (fail-safe mode)" "$(basename ${DESTDIR_LIVE})/${DEFAULT_KERNEL}" "$(basename ${DESTDIR_LIVE})/${DEFAULT_INITRD}" "${FAILSAFE}"
for KERNEL in chroot/boot/vmlinuz-*
do
- VERSION="`basename ${KERNEL} | sed -e 's/vmlinuz-//'`"
+ VERSION="$(basename ${KERNEL} | sed -e 's/vmlinuz-//')"
- Grub_live_entry "live, kernel ${VERSION}" "`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}`" "`basename ${DESTDIR_LIVE}`/initrd.img-${VERSION}"
- Grub_live_entry "live, kernel ${VERSION} (fail-safe mode)" "`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}`" "`basename ${DESTDIR_LIVE}`/initrd.img-${VERSION}" "${FAILSAFE}"
+ Grub_live_entry "live, kernel ${VERSION}" "$(basename ${DESTDIR_LIVE})/$(basename ${KERNEL})" "$(basename ${DESTDIR_LIVE})/initrd.img-${VERSION}"
+ Grub_live_entry "live, kernel ${VERSION} (fail-safe mode)" "$(basename ${DESTDIR_LIVE})/$(basename ${KERNEL})" "$(basename ${DESTDIR_LIVE})/initrd.img-${VERSION}" "${FAILSAFE}"
done
-LINUX_LIVE="`/bin/echo ${LINUX_LIVE} | sed -e 's/binary//g' -e 's#//#/#g'`"
+LINUX_LIVE="$(/bin/echo ${LINUX_LIVE} | sed -e 's/binary//g' -e 's#//#/#g')"
# Assembling debian-installer configuration
if [ "${LH_DEBIAN_INSTALLER}" != "disabled" ]
@@ -226,14 +226,14 @@ then
Grub_install_entry "autogui" "${VMLINUZ_GI}" "${INITRD_GI}" "auto=true priority=critical ${APPEND_GI}"
fi
-LINUX_INSTALL="`/bin/echo ${LINUX_INSTALL} | sed -e 's/binary//g' -e 's#//#/#g'`"
+LINUX_INSTALL="$(/bin/echo ${LINUX_INSTALL} | sed -e 's/binary//g' -e 's#//#/#g'("
# Assembling memtest configuration
if [ -f "${DESTDIR_LIVE}"/memtest ]
then
MEMTEST="title\t\tOther:\nroot"
- MEMTEST="${MEMTEST}\n\ntitle\t\t${LH_MEMTEST}\nkernel\t\t/`basename ${DESTDIR_LIVE}`/memtest"
- MEMTEST="`/bin/echo ${MEMTEST} | sed -e 's#//#/#g'`"
+ MEMTEST="${MEMTEST}\n\ntitle\t\t${LH_MEMTEST}\nkernel\t\t/$(basename ${DESTDIR_LIVE})/memtest"
+ MEMTEST="$(/bin/echo ${MEMTEST} | sed -e 's#//#/#g')"
fi
# Copying templates
@@ -252,7 +252,7 @@ esac
if [ "${LH_CHROOT_BUILD}" = "disabled" ]
then
- FILES="`echo ${FILES} | sed -e 's/chroot//g'`"
+ FILES="$(echo ${FILES} | sed -e 's/chroot//g')"
fi
# Copying grub
@@ -285,7 +285,7 @@ then
else
# Overwriting splash file
cp -f "${LH_GRUB_SPLASH}" binary/boot/grub
- sed -i -e "s#splashimage.*#splashimage /boot/grub/`basename ${LH_GRUB_SPLASH}`#" binary/boot/grub/menu.lst
+ sed -i -e "s#splashimage.*#splashimage /boot/grub/$(basename ${LH_GRUB_SPLASH})#" binary/boot/grub/menu.lst
fi
fi
diff --git a/helpers/lh_binary_includes b/helpers/lh_binary_includes
index 83f207eee..e90716ba2 100755
--- a/helpers/lh_binary_includes
+++ b/helpers/lh_binary_includes
@@ -133,10 +133,10 @@ then
fi
# Adjusting install templates
- ARCHITECTURE="`echo ${LH_ARCHITECTURE} | sed -e 's# #/#g'`"
- DISTRIBUTION="`echo ${LH_DISTRIBUTION} | cut -b 1 | tr '[a-z]' '[A-Z]'`"
- DISTRIBUTION="${DISTRIBUTION}`echo ${LH_DISTRIBUTION} | cut -b 2-`"
- eval VERSION="$`echo VERSION_${LH_DISTRIBUTION}`"
+ ARCHITECTURE="$(echo ${LH_ARCHITECTURE} | sed -e 's# #/#g')"
+ DISTRIBUTION="$(echo ${LH_DISTRIBUTION} | cut -b 1 | tr '[a-z]' '[A-Z]')"
+ DISTRIBUTION="${DISTRIBUTION}$(echo ${LH_DISTRIBUTION} | cut -b 2-)"
+ eval VERSION="$$(echo VERSION_${LH_DISTRIBUTION})"
if [ -d binary/pool/main/l/live-installer ]
then
@@ -145,8 +145,8 @@ then
TYPE="LIVE/NETINST"
- DEBIAN_NAME="Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} ${TYPE} Binary `date +%Y%m%d-%H:%M`"
- DEBIAN_DATE="`date +%Y%m%d-%H:%M`"
+ DEBIAN_NAME="Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} ${TYPE} Binary $(date +%Y%m%d-%H:%M)"
+ DEBIAN_DATE="$(date +%Y%m%d-%H:%M)"
if [ "${LH_ARCHITECTURE}" = "i386" ]
then
diff --git a/helpers/lh_binary_net b/helpers/lh_binary_net
index 2fb6e2cad..ac7464e32 100755
--- a/helpers/lh_binary_net
+++ b/helpers/lh_binary_net
@@ -59,21 +59,21 @@ then
fi
# Creating image file
-if [ "`basename ${LH_NET_PATH}`" = "chroot" ]
+if [ "$(basename ${LH_NET_PATH})" = "chroot" ]
then
mv chroot chroot.tmp
fi
-mv binary "`basename ${LH_NET_PATH}`"
+mv binary "$(basename ${LH_NET_PATH})"
cd ..
-tar cfz binary-net.tar.gz "`basename ${OLDPWD}`/`basename ${LH_NET_PATH}`" "`basename ${OLDPWD}`/tftpboot"
+tar cfz binary-net.tar.gz "$(basename ${OLDPWD})/$(basename ${LH_NET_PATH})" "$(basename ${OLDPWD})/tftpboot"
mv binary-net.tar.gz "${OLDPWD}"
cd "${OLDPWD}"
-mv "`basename ${LH_NET_PATH}`" binary
+mv "$(basename ${LH_NET_PATH})" binary
-if [ "`basename ${LH_NET_PATH}`" = "chroot" ]
+if [ "$(basename ${LH_NET_PATH})" = "chroot" ]
then
mv chroot.tmp chroot
fi
diff --git a/helpers/lh_binary_rootfs b/helpers/lh_binary_rootfs
index f800709c1..0fe90433c 100755
--- a/helpers/lh_binary_rootfs
+++ b/helpers/lh_binary_rootfs
@@ -84,7 +84,7 @@ do
if [ -n "${LH_ROOT_COMMAND}" ]
then
- ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` binary
+ ${LH_ROOT_COMMAND} chown -R $(whoami):$(whoami) binary
fi
# Creating stage file
@@ -110,8 +110,8 @@ case "${LH_CHROOT_FILESYSTEM}" in
rm -f binary/${INITFS}/filesystem.ext2
fi
- DU_DIM="`du -ks chroot/chroot | cut -f1`"
- REAL_DIM="`expr ${DU_DIM} + ${DU_DIM} / 20`" # Just 5% more to be sure, need something more sophistcated here...
+ DU_DIM="$(du -ks chroot/chroot | cut -f1)"
+ REAL_DIM="$(expr ${DU_DIM} + ${DU_DIM} / 20)" # Just 5% more to be sure, need something more sophistcated here...
case "${LH_CHROOT_BUILD}" in
enabled)
@@ -179,7 +179,7 @@ case "${LH_CHROOT_FILESYSTEM}" in
if [ "${LH_PACKAGES_LISTS}" = "minimal" ] || [ "${LH_PACKAGES_LISTS}" = "mini" ]
then
- MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -e `ls chroot/boot/${LINUX}* chroot/boot/initrd.img* chroot/${LINUX}* chroot/initrd.img* | sed 's,chroot/,,g'`"
+ MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -e $(ls chroot/boot/${LINUX}* chroot/boot/initrd.img* chroot/${LINUX}* chroot/initrd.img* | sed 's,chroot/,,g')"
fi
if [ -f config/binary_rootfs/squashfs.sort ]
@@ -205,7 +205,7 @@ case "${LH_CHROOT_FILESYSTEM}" in
if [ -n "${LH_ROOT_COMMAND}" ]
then
- ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` binary/${INITFS}
+ ${LH_ROOT_COMMAND} chown -R $(whoami):$(whoami) binary/${INITFS}
fi
# Saving cache
@@ -228,7 +228,7 @@ do
if [ -n "${LH_ROOT_COMMAND}" ]
then
- ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` cache/stages_rootfs
+ ${LH_ROOT_COMMAND} chown -R $(whoami):$(whoami) cache/stages_rootfs
fi
fi
done
diff --git a/helpers/lh_binary_syslinux b/helpers/lh_binary_syslinux
index 4d26626dc..b84523701 100755
--- a/helpers/lh_binary_syslinux
+++ b/helpers/lh_binary_syslinux
@@ -80,7 +80,7 @@ Syslinux_memtest_entry ()
KERNEL="${3}"
# syslinux << 3.36 lacks support to file/path
- if [ "`basename ${DESTDIR_LIVE}`" = "binary" ]
+ if [ "$(basename ${DESTDIR_LIVE})" = "binary" ]
then
KERNEL="${DIRECTORY}/${KERNEL}"
fi
@@ -94,7 +94,7 @@ Syslinux_memtest_entry ()
fi
MEMTEST="${MEMTEST}\tkernel /${KERNEL}\n"
- MEMTEST="`/bin/echo ${MEMTEST} | sed -e 's#//#/#g'`"
+ MEMTEST="$(/bin/echo ${MEMTEST} | sed -e 's#//#/#g')"
}
Syslinux_live_entry ()
@@ -106,9 +106,9 @@ Syslinux_live_entry ()
APPEND="${5}"
# syslinux << 3.36 lacks support to file/path
- if [ "${LH_BINARY_IMAGES}" != "net" ] && [ "`basename ${DESTDIR_LIVE}`" != "binary" ]
+ if [ "${LH_BINARY_IMAGES}" != "net" ] && [ "$(basename ${DESTDIR_LIVE})" != "binary" ]
then
- DIRECTORY="`basename ${DESTDIR_LIVE}`"
+ DIRECTORY="$(basename ${DESTDIR_LIVE})"
KERNEL="${DIRECTORY}/${KERNEL}"
INITRD="${DIRECTORY}/${INITRD}"
fi
@@ -133,9 +133,9 @@ Syslinux_install_entry ()
APPEND="${4}"
# syslinux << 3.36 lacks support to file/path
- if [ "${LH_BINARY_IMAGES}" != "net" ] && [ "`basename ${DESTDIR_INSTALL}`" != "binary" ]
+ if [ "${LH_BINARY_IMAGES}" != "net" ] && [ "$(basename ${DESTDIR_INSTALL})" != "binary" ]
then
- DIRECTORY="`basename ${DESTDIR_INSTALL}`"
+ DIRECTORY="$(basename ${DESTDIR_INSTALL})"
KERNEL="${DIRECTORY}/${KERNEL}"
INITRD="${DIRECTORY}/${INITRD}"
fi
@@ -275,7 +275,7 @@ then
fi
fi
-LH_BOOTAPPEND_LIVE="`echo ${LH_BOOTAPPEND_LIVE} | sed -e 's/ //'`"
+LH_BOOTAPPEND_LIVE="$(echo ${LH_BOOTAPPEND_LIVE} | sed -e 's/ //')"
# Parameters are listed at: linux/Documentation/kernel-parameters.txt
FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=normal"
@@ -283,19 +283,19 @@ FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=normal"
# Assembling kernel configuration
# Default entries
-DEFAULT_FLAVOUR="`echo ${LH_LINUX_FLAVOURS} | awk '{ print $1 }'`"
-DEFAULT_KERNEL="`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`"
-DEFAULT_INITRD="initrd.img-`echo ${DEFAULT_KERNEL} | sed -e 's/vmlinuz-//'`"
+DEFAULT_FLAVOUR="$(echo ${LH_LINUX_FLAVOURS} | awk '{ print $1 }')"
+DEFAULT_KERNEL="$(basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR})"
+DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's/vmlinuz-//')"
Syslinux_live_entry "live" "${LH_SYSLINUX_MENU_LH_ENTRY}" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}"
Syslinux_live_entry "live-failsafe" "${LH_SYSLINUX_MENU_LIVE_FAILSAFE_ENTRY}" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}" "${FAILSAFE}"
-if [ "`echo ${LH_LINUX_FLAVOURS} | wc -w`" -gt "1" ]
+if [ "$(echo ${LH_LINUX_FLAVOURS} | wc -w)" -gt "1" ]
then
for KERNEL in chroot/boot/vmlinuz-*
do
- KERNEL_IMAGE="`basename ${KERNEL}`"
- KERNEL_VERSION="`echo ${KERNEL_IMAGE} | sed -e 's/vmlinuz-//'`"
+ KERNEL_IMAGE="$(basename ${KERNEL})"
+ KERNEL_VERSION="$(echo ${KERNEL_IMAGE} | sed -e 's/vmlinuz-//')"
INITRD="initrd.img-${KERNEL_VERSION}"
Syslinux_live_entry "live-${KERNEL_VERSION}" "${LH_SYSLINUX_MENU_LIVE_ENTRY}" "${KERNEL_IMAGE}" "${INITRD}"
@@ -303,7 +303,7 @@ then
done
fi
-LINUX_LIVE="`/bin/echo ${LINUX_LIVE} | sed -e 's/binary//g' -e 's#//#/#g'`"
+LINUX_LIVE="$(/bin/echo ${LINUX_LIVE} | sed -e 's/binary//g' -e 's#//#/#g')"
# Assembling debian-installer configuration
if [ "${LH_DEBIAN_INSTALLER}" != "disabled" ]
@@ -340,7 +340,7 @@ then
Syslinux_install_entry "autogui" "${VMLINUZ_GI}" "${INITRD_GI}" "auto=true priority=critical ${APPEND_GI}"
fi
-LINUX_INSTALL="`/bin/echo ${LINUX_INSTALL} | sed -e 's/binary//g' -e 's#//#/#g'`"
+LINUX_INSTALL="$(/bin/echo ${LINUX_INSTALL} | sed -e 's/binary//g' -e 's#//#/#g')"
# Assembling memtest configuration
if [ -f "${DESTDIR_LIVE}"/memtest ]
@@ -368,21 +368,21 @@ case "${LH_BINARY_IMAGES}" in
for FILE in binary/isolinux/*.live
do
- mv ${FILE} `dirname ${FILE}`/`basename ${FILE} .live`
+ mv ${FILE} $(dirname ${FILE})/$(basename ${FILE} .live)
done
if [ "${LH_DEBIAN_INSTALLER}" != "disabled" ]
then
for FILE in binary/isolinux/*.install
do
- mv ${FILE} `dirname ${FILE}`/`basename ${FILE} .install`
+ mv ${FILE} $(dirname ${FILE})/$(basename ${FILE} .install)
done
if [ "${LH_ARCHITECTURE}" = "amd64" ] || [ "${LH_ARCHITECTURE}" = "i386" ] || [ "${LH_ARCHITECTURE}" = "powerpc" ]
then
for FILE in binary/isolinux/*.install.g-i
do
- mv ${FILE} `dirname ${FILE}`/`basename ${FILE} .install.g-i`
+ mv ${FILE} $(dirname ${FILE})/$(basename ${FILE} .install.g-i)
done
else
rm -f binary/isolinux/*.install.g-i
@@ -408,11 +408,11 @@ case "${LH_BINARY_IMAGES}" in
# Copying menu module
if [ "${LH_SYSLINUX_MENU}" != "disabled" ]
then
- MENUPATH="`grep 'menu.c32' binary/isolinux/isolinux.cfg | sed 's,DEFAULT\s*\(.*menu.c32\)$,\1,g'`"
- MENUMODULE="`basename ${MENUPATH}`"
+ MENUPATH="$(grep 'menu.c32' binary/isolinux/isolinux.cfg | sed 's,DEFAULT\s*\(.*menu.c32\)$,\1,g')"
+ MENUMODULE="$(basename ${MENUPATH})"
- mkdir -p binary/isolinux/"`dirname ${MENUPATH}`"
- cp chroot/usr/lib/syslinux/"${MENUMODULE}" binary/isolinux/"`dirname ${MENUPATH}`"
+ mkdir -p binary/isolinux/"$(dirname ${MENUPATH})"
+ cp chroot/usr/lib/syslinux/"${MENUMODULE}" binary/isolinux/"$(dirname ${MENUPATH})"
fi
# Copying splash screen
@@ -423,13 +423,13 @@ case "${LH_BINARY_IMAGES}" in
else
if [ "${LH_SYSLINUX_MENU}" != "disabled" ]
then
- SPLASHPATH="`grep -i 'MENU BACKGROUND' binary/isolinux/isolinux.cfg | sed 's,MENU\sBACKGROUND\s*\(.*\)$,\1,g'`"
+ SPLASHPATH="$(grep -i 'MENU BACKGROUND' binary/isolinux/isolinux.cfg | sed 's,MENU\sBACKGROUND\s*\(.*\)$,\1,g')"
if [ ! -e "${LH_SYSLINUX_SPLASH}" ]
then
Echo_error "${LH_SYSLINUX_SPLASH} doen't exist"
exit 1
fi
- mkdir -p binary/isolinux/"`dirname ${SPLASHPATH}`"
+ mkdir -p binary/isolinux/"$(dirname ${SPLASHPATH})"
cp -f "${LH_SYSLINUX_SPLASH}" binary/isolinux/"${SPLASHPATH}"
else
cp -f "${LH_SYSLINUX_SPLASH}" binary/isolinux/splash.rle
@@ -441,7 +441,7 @@ case "${LH_BINARY_IMAGES}" in
sed -i -e "s#LH_BOOTAPPEND_INSTALL#${LH_BOOTAPPEND_INSTALL}#" -e "s#LH_BOOTAPPEND_LIVE#${LH_BOOTAPPEND_LIVE}#" binary/isolinux/isolinux.cfg
if [ -e binary/isolinux/f1.txt ]
then
- sed -i -e "s/LH_DISTRIBUTION/${LH_DISTRIBUTION}/" -e "s/LH_DATE/`date +%Y%m%d`/" -e "s/LH_MEDIA/CD-ROM/" binary/isolinux/f1.txt
+ sed -i -e "s/LH_DISTRIBUTION/${LH_DISTRIBUTION}/" -e "s/LH_DATE/$(date +%Y%m%d)/" -e "s/LH_MEDIA/CD-ROM/" binary/isolinux/f1.txt
fi
sed -i -e "s/LH_MEDIA/CD-ROM/" binary/isolinux/f3.txt
if [ -e binary/isolinux/f10.txt ]
@@ -450,7 +450,7 @@ case "${LH_BINARY_IMAGES}" in
fi
# Working arround syslinux 8.3 limitation
- if [ "`echo ${LH_LINUX_FLAVOURS} | wc -w`" -gt "1" ]
+ if [ "$(echo ${LH_LINUX_FLAVOURS} | wc -w)" -gt "1" ]
then
NUMBER="0"
@@ -496,21 +496,21 @@ case "${LH_BINARY_IMAGES}" in
for FILE in tftpboot/pxelinux.cfg/*.live
do
- mv ${FILE} `dirname ${FILE}`/`basename ${FILE} .live`
+ mv ${FILE} $(dirname ${FILE})/$(basename ${FILE} .live)
done
if [ "${LH_DEBIAN_INSTALLER}" != "disabled" ]
then
for FILE in tftpboot/pxelinux.cfg/*.install
do
- mv ${FILE} `dirname ${FILE}`/`basename ${FILE} .install`
+ mv ${FILE} $(dirname ${FILE})/$(basename ${FILE} .install)
done
if [ "${LH_ARCHITECTURE}" = "amd64" ] || [ "${LH_ARCHITECTURE}" = "i386" ] || [ "${LH_ARCHITECTURE}" = "powerpc" ]
then
for FILE in tftpboot/pxelinux.cfg/*.install.g-i
do
- mv ${FILE} `dirname ${FILE}`/`basename ${FILE} .install.g-i`
+ mv ${FILE} $(dirname ${FILE})/$(basename ${FILE} .install.g-i)
done
else
rm -f tftpboot/pxelinux.cfg/*.install.g-i
@@ -549,12 +549,12 @@ case "${LH_BINARY_IMAGES}" in
# Configure syslinux templates
sed -i -e "s@LINUX_LIVE@${LINUX_LIVE}@" -e "s@LINUX_INSTALL@${LINUX_INSTALL}@" -e "s@MEMTEST@${MEMTEST}@" tftpboot/pxelinux.cfg/default
sed -i -e "s#LH_BOOTAPPEND_INSTALL#${LH_BOOTAPPEND_INSTALL}#" -e "s#LH_BOOTAPPEND_LIVE#${LH_BOOTAPPEND_LIVE}#" -e "s/LH_NET_SERVER/${LH_NET_SERVER}/" -e "s#LH_NET_PATH#${LH_NET_PATH}#" tftpboot/pxelinux.cfg/default
- sed -i -e "s/LH_DISTRIBUTION/${LH_DISTRIBUTION}/" -e "s/LH_DATE/`date +%Y%m%d`/" -e "s/LH_MEDIA/netboot/" tftpboot/pxelinux.cfg/f1.txt
+ sed -i -e "s/LH_DISTRIBUTION/${LH_DISTRIBUTION}/" -e "s/LH_DATE/$(date +%Y%m%d)/" -e "s/LH_MEDIA/netboot/" tftpboot/pxelinux.cfg/f1.txt
sed -i -e "s/LH_MEDIA/netboot/" tftpboot/pxelinux.cfg/f3.txt
sed -i -e "s/LH_VERSION/${VERSION}/" tftpboot/pxelinux.cfg/f10.txt
# Working arround syslinux 8.3 limitation
- if [ "`echo ${LH_LINUX_FLAVOURS} | wc -w`" -eq "1" ]
+ if [ "$(echo ${LH_LINUX_FLAVOURS} | wc -w)" -eq "1" ]
then
mv "${DESTDIR_LIVE}"/vmlinuz-*-${LH_LINUX_FLAVOURS} "${DESTDIR_LIVE}"/vmlinuz
mv "${DESTDIR_LIVE}"/initrd.img-*-${LH_LINUX_FLAVOURS} "${DESTDIR_LIVE}"/initrd.img
@@ -594,21 +594,21 @@ case "${LH_BINARY_IMAGES}" in
for FILE in "${DESTDIR}"/*.live
do
- mv ${FILE} `dirname ${FILE}`/`basename ${FILE} .live`
+ mv ${FILE} $(dirname ${FILE})/$(basename ${FILE} .live)
done
if [ "${LH_DEBIAN_INSTALLER}" != "disabled" ]
then
for FILE in "${DESTDIR}"/*.install
do
- mv ${FILE} `dirname ${FILE}`/`basename ${FILE} .install`
+ mv ${FILE} $(dirname ${FILE})/$(basename ${FILE} .install)
done
if [ "${LH_ARCHITECTURE}" = "amd64" ] || [ "${LH_ARCHITECTURE}" = "i386" ] || [ "${LH_ARCHITECTURE}" = "powerpc" ]
then
for FILE in "${DESTDIR}"/*.install.g-i
do
- mv ${FILE} `dirname ${FILE}`/`basename ${FILE} .install.g-i`
+ mv ${FILE} $(dirname ${FILE})/$(basename ${FILE} .install.g-i)
done
else
rm -f "${DESTDIR}"/*.install.g-i
@@ -643,12 +643,12 @@ case "${LH_BINARY_IMAGES}" in
# Configure syslinux templates
sed -i -e "s@LINUX_LIVE@${LINUX_LIVE}@" -e "s@LINUX_INSTALL@${LINUX_INSTALL}@" -e "s@MEMTEST@${MEMTEST}@" "${DESTDIR}"/syslinux.cfg
sed -i -e "s#LH_BOOTAPPEND_INSTALL#${LH_BOOTAPPEND_INSTALL}#" -e "s#LH_BOOTAPPEND_LIVE#${LH_BOOTAPPEND_LIVE}#" "${DESTDIR}"/syslinux.cfg
- sed -i -e "s/LH_DISTRIBUTION/${LH_DISTRIBUTION}/" -e "s/LH_DATE/`date +%Y%m%d`/" -e "s/LH_MEDIA/hd-media/" "${DESTDIR}"/f1.txt #FIXME
+ sed -i -e "s/LH_DISTRIBUTION/${LH_DISTRIBUTION}/" -e "s/LH_DATE/$(date +%Y%m%d)/" -e "s/LH_MEDIA/hd-media/" "${DESTDIR}"/f1.txt #FIXME
sed -i -e "s/LH_MEDIA/hd-media/" "${DESTDIR}"/f3.txt #FIXME
sed -i -e "s/LH_VERSION/${VERSION}/" "${DESTDIR}"/f10.txt
# Workaround for syslinux (<< 3.36) which doesn't support long file/path names
- if [ "`echo ${LH_LINUX_FLAVOURS} | wc -w`" -gt "1" ]
+ if [ "$(echo ${LH_LINUX_FLAVOURS} | wc -w)" -gt "1" ]
then
NUMBER="0"
diff --git a/helpers/lh_binary_usb-hdd b/helpers/lh_binary_usb-hdd
index 09c38f7a4..ac5d5a52f 100755
--- a/helpers/lh_binary_usb-hdd
+++ b/helpers/lh_binary_usb-hdd
@@ -81,10 +81,10 @@ then
fi
# Everything which comes here needs to be cleaned up,
-DU_DIM="`du -ms binary | cut -f1`"
-REAL_DIM="`expr ${DU_DIM} + ${DU_DIM} / 50`" # Just 2% more to be sure, need something more sophistcated here...
+DU_DIM="$(du -ms binary | cut -f1)"
+REAL_DIM="$(expr ${DU_DIM} + ${DU_DIM} / 50)" # Just 2% more to be sure, need something more sophistcated here...
dd if=/dev/zero of=chroot/binary.img bs=1024k count=${REAL_DIM}
-FREELO="`${LH_LOSETUP} -f`"
+FREELO="$(${LH_LOSETUP} -f)"
if [ ! -b chroot/${FREELO} ]
then
MAKEDEV="true"
@@ -124,7 +124,7 @@ esac
${LH_LOSETUP} -d ${FREELO}
-FREELO="`${LH_LOSETUP} -f`"
+FREELO="$(${LH_LOSETUP} -f)"
lh_losetup $FREELO chroot/binary.img 1
case "${LH_CHROOT_BUILD}" in
@@ -153,8 +153,8 @@ find /live/vmlinuz
EOM
EOF
- rootpartition="`Chroot 'sh grub.sh' 2>/dev/null | grep -A 1 'find /live/vmlinuz' | grep -v 'find /live/vmlinuz'`"
- usbdev="`echo $rootpartition | sed -e 's/,[[:digit:]]//'`"
+ rootpartition="$(Chroot 'sh grub.sh' 2>/dev/null | grep -A 1 'find /live/vmlinuz' | grep -v 'find /live/vmlinuz')"
+ usbdev="$(echo $rootpartition | sed -e 's/,[[:digit:]]//')"
echo "Root partition is $rootpartition, device is: $usbdev"
echo "WAITING..." && read
diff --git a/helpers/lh_binary_yaboot b/helpers/lh_binary_yaboot
index c404c3122..e3f8df3ee 100755
--- a/helpers/lh_binary_yaboot
+++ b/helpers/lh_binary_yaboot
@@ -75,7 +75,7 @@ Yaboot_live_entry ()
INITRD="${3}"
APPEND="${4}"
- DIRECTORY="/`basename ${DESTDIR_LIVE}`"
+ DIRECTORY="/$(basename ${DESTDIR_LIVE})"
LINUX_LIVE="${LINUX_LIVE}\nimage=${DIRECTORY}/${KERNEL}\n"
LINUX_LIVE="${LINUX_LIVE}\tlabel=${LABEL}\n"
@@ -91,7 +91,7 @@ Yaboot_install_entry ()
INITRD="${3}"
APPEND="${4}"
- DIRECTORY="/`basename ${DESTDIR_LIVE}`"
+ DIRECTORY="/$(basename ${DESTDIR_LIVE})"
if [ "${LH_DISTRIBUTION}" != "etch" ] && [ "${LABEL}" != "rescue" ] && [ "${LABEL}" != "rescuegui" ]
then
@@ -185,7 +185,7 @@ then
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} union=${LH_UNION_FILESYSTEM}"
fi
-LH_BOOTAPPEND_LIVE="`echo ${LH_BOOTAPPEND_LIVE} | sed -e 's/ //'`"
+LH_BOOTAPPEND_LIVE="$(echo ${LH_BOOTAPPEND_LIVE} | sed -e 's/ //')"
# Parameters are listed at: linux/Documentation/kernel-parameters.txt
FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=ofonly"
@@ -193,19 +193,19 @@ FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=ofonly"
# Assembling kernel configuration
# Default entries
-DEFAULT_FLAVOUR="`echo ${LH_LINUX_FLAVOURS} | awk '{ print $1 }'`"
-DEFAULT_KERNEL="`basename chroot/boot/vmlinux-*${DEFAULT_FLAVOUR}`"
-DEFAULT_INITRD="initrd.img-`echo ${DEFAULT_KERNEL} | sed -e 's/vmlinux-//'`"
+DEFAULT_FLAVOUR="$(echo ${LH_LINUX_FLAVOURS} | awk '{ print $1 }')"
+DEFAULT_KERNEL="$(basename chroot/boot/vmlinux-*${DEFAULT_FLAVOUR})"
+DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's/vmlinux-//')"
Yaboot_live_entry "live" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}"
Yaboot_live_entry "live-failsafe" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}" "${FAILSAFE}"
-if [ "`echo ${LH_LINUX_FLAVOURS} | wc -w`" -gt "1" ]
+if [ "$(echo ${LH_LINUX_FLAVOURS} | wc -w)" -gt "1" ]
then
for KERNEL in chroot/boot/vmlinux-*
do
- KERNEL_IMAGE="`basename ${KERNEL}`"
- KERNEL_VERSION="`echo ${KERNEL_IMAGE} | sed -e 's/vmlinux-//'`"
+ KERNEL_IMAGE="$(basename ${KERNEL})"
+ KERNEL_VERSION="$(echo ${KERNEL_IMAGE} | sed -e 's/vmlinux-//')"
INITRD="initrd.img-${KERNEL_VERSION}"
Yaboot_live_entry "live-${KERNEL_VERSION}" "${KERNEL_IMAGE}" "${INITRD}"
@@ -213,7 +213,7 @@ then
done
fi
-LINUX_LIVE="`/bin/echo ${LINUX_LIVE} | sed -e 's/binary//g' -e 's#//#/#g'`"
+LINUX_LIVE="$(/bin/echo ${LINUX_LIVE} | sed -e 's/binary//g' -e 's#//#/#g')"
# Assembling debian-installer configuration
if [ "${LH_DEBIAN_INSTALLER}" != "disabled" ]
@@ -237,7 +237,7 @@ then
Yaboot_install_entry "autogui" "${VMLINUZ_GI}" "${INITRD_GI}" "auto=true priority=critical ${APPEND_GI}"
fi
-LINUX_INSTALL="`/bin/echo ${LINUX_INSTALL} | sed -e 's/binary//g' -e 's#//#/#g'`"
+LINUX_INSTALL="$(/bin/echo ${LINUX_INSTALL} | sed -e 's/binary//g' -e 's#//#/#g')"
case "${LH_BINARY_IMAGES}" in
iso|usb-hdd)
@@ -267,7 +267,7 @@ case "${LH_BINARY_IMAGES}" in
# Configure yaboot templates
sed -i -e "s#LINUX_LIVE#${LINUX_LIVE}#" -e "s#LINUX_INSTALL#${LINUX_INSTALL}#" binary/yaboot/yaboot.conf
sed -i -e "s#LH_BOOTAPPEND_INSTALL#${LH_BOOTAPPEND_INSTALL}#" -e "s#LH_BOOTAPPEND_LIVE#${LH_BOOTAPPEND_LIVE}#" binary/yaboot/yaboot.conf
- sed -i -e "s/LH_DATE/`date +%Y%m%d`/" -e "s/LH_VERSION/${VERSION}/" binary/yaboot/boot.msg
+ sed -i -e "s/LH_DATE/$(date +%Y%m%d)/" -e "s/LH_VERSION/${VERSION}/" binary/yaboot/boot.msg
;;
esac
diff --git a/helpers/lh_bootstrap_cache b/helpers/lh_bootstrap_cache
index b253b5d1c..66f57c203 100755
--- a/helpers/lh_bootstrap_cache
+++ b/helpers/lh_bootstrap_cache
@@ -60,7 +60,7 @@ do
if [ -n "${LH_ROOT_COMMAND}" ]
then
- ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` chroot
+ ${LH_ROOT_COMMAND} chown -R $(whoami):$(whoami) chroot
fi
# Creating stage file
@@ -89,7 +89,7 @@ do
if [ -n "${LH_ROOT_COMMAND}" ]
then
- ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` cache/stages_bootstrap
+ ${LH_ROOT_COMMAND} chown -R $(whoami):$(whoami) cache/stages_bootstrap
fi
# Creating stage file
diff --git a/helpers/lh_bootstrap_cdebootstrap b/helpers/lh_bootstrap_cdebootstrap
index dcc350d74..225b24d4d 100755
--- a/helpers/lh_bootstrap_cdebootstrap
+++ b/helpers/lh_bootstrap_cdebootstrap
@@ -111,7 +111,7 @@ then
if [ -n "${LH_ROOT_COMMAND}" ]
then
- ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` chroot
+ ${LH_ROOT_COMMAND} chown -R $(whoami):$(whoami) chroot
fi
# Removing old cache
@@ -131,7 +131,7 @@ then
if [ -n "${LH_ROOT_COMMAND}" ]
then
- ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` chroot
+ ${LH_ROOT_COMMAND} chown -R $(whoami):$(whoami) chroot
fi
# Remove cdebootstrap-helper-diverts (needed at least for minimal flavours)
diff --git a/helpers/lh_bootstrap_copy b/helpers/lh_bootstrap_copy
index d84916cc9..1f48c7f76 100755
--- a/helpers/lh_bootstrap_copy
+++ b/helpers/lh_bootstrap_copy
@@ -53,7 +53,7 @@ Check_lockfile .lock
Create_lockfile .lock
# Copying host system
-find / ! -name /proc ! -name /sys ! -name "`dirname ${PWD}`" | xargs cp -a chroot
+find / ! -name /proc ! -name /sys ! -name "$(dirname ${PWD})" | xargs cp -a chroot
# Creating stage file
Create_stagefile .stage/bootstrap
diff --git a/helpers/lh_bootstrap_debootstrap b/helpers/lh_bootstrap_debootstrap
index 7661025d3..99df978b1 100755
--- a/helpers/lh_bootstrap_debootstrap
+++ b/helpers/lh_bootstrap_debootstrap
@@ -89,7 +89,7 @@ then
if [ -n "${LH_ROOT_COMMAND}" ]
then
- ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` chroot
+ ${LH_ROOT_COMMAND} chown -R $(whoami):$(whoami) chroot
fi
# Removing old cache
@@ -109,7 +109,7 @@ then
if [ -n "${LH_ROOT_COMMAND}" ]
then
- ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` chroot
+ ${LH_ROOT_COMMAND} chown -R $(whoami):$(whoami) chroot
fi
# Removing bootstrap cache
diff --git a/helpers/lh_chroot_cache b/helpers/lh_chroot_cache
index 4ec2d13b2..782043dae 100755
--- a/helpers/lh_chroot_cache
+++ b/helpers/lh_chroot_cache
@@ -60,7 +60,7 @@ do
if [ -n "${LH_ROOT_COMMAND}" ]
then
- ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` chroot
+ ${LH_ROOT_COMMAND} chown -R $(whoami):$(whoami) chroot
fi
# Creating stage file
@@ -88,7 +88,7 @@ do
if [ -n "${LH_ROOT_COMMAND}" ]
then
- ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` cache/stages_chroot
+ ${LH_ROOT_COMMAND} chown -R $(whoami):$(whoami) cache/stages_chroot
fi
# Creating stage file
diff --git a/helpers/lh_chroot_hacks b/helpers/lh_chroot_hacks
index 2b571a54c..da2be1723 100755
--- a/helpers/lh_chroot_hacks
+++ b/helpers/lh_chroot_hacks
@@ -69,7 +69,7 @@ case "${LH_BINARY_IMAGES}" in
then
mkdir chroot/etc/initramfs-tools
fi
- if [ ! "`grep 'MODULES=netboot' chroot/etc/initramfs-tools/initramfs.conf`" ]
+ if [ ! "$(grep 'MODULES=netboot' chroot/etc/initramfs-tools/initramfs.conf)" ]
then
# Configuring initramfs for NFS
cat >> chroot/etc/initramfs-tools/initramfs.conf << EOF
@@ -103,7 +103,7 @@ rm -f chroot/var/lib/dpkg/*-old
if [ -n "${LH_ROOT_COMMAND}" ]
then
- ${LH_ROOT_COMMAND} chown -R --quiet `whoami`:`whoami` chroot
+ ${LH_ROOT_COMMAND} chown -R --quiet $(whoami):$(whoami) chroot
fi
if [ -d chroot/home/${LH_USERNAME} ]
diff --git a/helpers/lh_chroot_local-hooks b/helpers/lh_chroot_local-hooks
index 6197b48a9..d0f487b16 100755
--- a/helpers/lh_chroot_local-hooks
+++ b/helpers/lh_chroot_local-hooks
@@ -56,16 +56,16 @@ then
cp "${HOOK}" chroot/root
# Making hook executable
- if [ ! -x chroot/root/"`basename ${HOOK}`" ]
+ if [ ! -x chroot/root/"$(basename ${HOOK})" ]
then
- chmod +x chroot/root/"`basename ${HOOK}`"
+ chmod +x chroot/root/"$(basename ${HOOK})"
fi
# Executing hook
- Chroot "/root/`basename ${HOOK}`"
+ Chroot "/root/$(basename ${HOOK})"
# Removing hook
- rm -f chroot/root/"`basename ${HOOK}`"
+ rm -f chroot/root/"$(basename ${HOOK})"
done
# Creating stage file
diff --git a/helpers/lh_chroot_local-packageslists b/helpers/lh_chroot_local-packageslists
index bd615e3cd..2c03f3c6b 100755
--- a/helpers/lh_chroot_local-packageslists
+++ b/helpers/lh_chroot_local-packageslists
@@ -55,21 +55,21 @@ then
for PACKAGESLIST in config/chroot_local-packageslists/*
do
# Generate package list
- Expand_packagelist "`basename ${PACKAGESLIST}`" "config/chroot_local-packageslists" "${LH_BASE:-/usr/share/live-helper/lists}/lists" > chroot/root/"`basename ${PACKAGESLIST}`"
+ Expand_packagelist "$(basename ${PACKAGESLIST})" "config/chroot_local-packageslists" "${LH_BASE:-/usr/share/live-helper/lists}/lists" > chroot/root/"$(basename ${PACKAGESLIST})"
# Installing package list
case "${LH_APT}" in
apt|apt-get)
- Chroot "xargs --arg-file=/root/`basename ${PACKAGESLIST}` apt-get install --yes"
+ Chroot "xargs --arg-file=/root/$(basename ${PACKAGESLIST}) apt-get install --yes"
;;
aptitude)
- Chroot "xargs --arg-file=/root/`basename ${PACKAGESLIST}` aptitude install --assume-yes"
+ Chroot "xargs --arg-file=/root/$(basename ${PACKAGESLIST}) aptitude install --assume-yes"
;;
esac
# Removing package list
- rm -f chroot/root/"`basename ${PACKAGESLIST}`"
+ rm -f chroot/root/"$(basename ${PACKAGESLIST})"
done
# Saving cache
diff --git a/helpers/lh_chroot_sources b/helpers/lh_chroot_sources
index 307aebae3..61e0b66d7 100755
--- a/helpers/lh_chroot_sources
+++ b/helpers/lh_chroot_sources
@@ -144,8 +144,8 @@ case "${1}" in
for FILE in config/chroot_sources/*.bootstrap.gpg
do
cp ${FILE} chroot/root
- Chroot "apt-key add /root/`basename ${FILE}`"
- rm -f chroot/root/`basename ${FILE}`
+ Chroot "apt-key add /root/$(basename ${FILE})"
+ rm -f chroot/root/$(basename ${FILE})
done
fi
@@ -155,8 +155,8 @@ case "${1}" in
for PACKAGE in config/chroot_sources/*.deb
do
cp ${PACKAGE} chroot/root
- Chroot "dpkg -i `basename ${PACKAGE}`"
- rm -f chroot/root/`basename ${PACKAGE}`
+ Chroot "dpkg -i $(basename ${PACKAGE})"
+ rm -f chroot/root/$(basename ${PACKAGE})
done
fi
@@ -279,8 +279,8 @@ case "${1}" in
for FILE in config/chroot_sources/*.binary.gpg
do
cp ${FILE} chroot/root
- Chroot "apt-key add /root/`basename ${FILE}`"
- rm -f chroot/root/`basename ${FILE}`
+ Chroot "apt-key add /root/$(basename ${FILE})"
+ rm -f chroot/root/$(basename ${FILE})
done
fi
diff --git a/helpers/lh_chroot_sysvinit b/helpers/lh_chroot_sysvinit
index b4927b61e..2ddbb1fe7 100755
--- a/helpers/lh_chroot_sysvinit
+++ b/helpers/lh_chroot_sysvinit
@@ -52,7 +52,7 @@ then
# Disable all
for FILE in chroot/etc/init.d/*
do
- Chroot "update-rc.d -f `basename ${FILE}` remove"
+ Chroot "update-rc.d -f $(basename ${FILE}) remove"
done
# Re-enable all required (taken from -f standard chroot)
diff --git a/helpers/lh_config b/helpers/lh_config
index 78604eada..a69bf3b76 100755
--- a/helpers/lh_config
+++ b/helpers/lh_config
@@ -101,7 +101,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
Local_arguments ()
{
- ARGUMENTS="`getopt --longoptions apt:,apt-ftp-proxy:,apt-http-proxy:,apt-pdiffs:,apt-pipeline:,apt-recommends:,apt-secure:,bootstrap:,cache:,cache-indices:,cache-packages:,cache-stages:,debconf-frontend:,debconf-nowarnings:,debconf-priority:,genisoimage:,initramfs:,losetup:,mode:,root-command:,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:,hooks:,interactive:,keyring-packages:,language:,linux-flavours:,linux-packages:,packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,binary-images:,binary-indices:,bootappend-install:,bootappend-live:,bootloader:,chroot-build:,debian-installer:,debian-installer-daily:,encryption:,grub-splash:,hostname:,iso-application:,iso-preparer:,iso-publisher:,iso-volume:,iso-memtest:,net-filesystem:,net-mountoptions:,net-path:,net-server:,syslinux-splash:,syslinux-timeout:,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-pipeline:,apt-recommends:,apt-secure:,bootstrap:,cache:,cache-indices:,cache-packages:,cache-stages:,debconf-frontend:,debconf-nowarnings:,debconf-priority:,genisoimage:,initramfs:,losetup:,mode:,root-command:,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:,hooks:,interactive:,keyring-packages:,language:,linux-flavours:,linux-packages:,packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,binary-images:,binary-indices:,bootappend-install:,bootappend-live:,bootloader:,chroot-build:,debian-installer:,debian-installer-daily:,encryption:,grub-splash:,hostname:,iso-application:,iso-preparer:,iso-publisher:,iso-volume:,iso-memtest:,net-filesystem:,net-mountoptions:,net-path:,net-server:,syslinux-splash:,syslinux-timeout:,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
@@ -965,7 +965,7 @@ EOF
if [ "${CONFIG}" = "clone" ] # FIXME
then
# Read package selection
- echo `dpkg --get-selections | awk '{ print $1 }'` > config/chroot_local-packageslists/local-system
+ echo $(dpkg --get-selections | awk '{ print $1 }') > config/chroot_local-packageslists/local-system
# Read debconf questions
if [ ! -f /usr/bin/debconf-get-selections ]
diff --git a/helpers/lh_losetup b/helpers/lh_losetup
index 662b4ad76..2ea7f9ea3 100755
--- a/helpers/lh_losetup
+++ b/helpers/lh_losetup
@@ -38,10 +38,10 @@ FILE="${2}"
PARTITION="${3:=1}"
${LH_ROOT_COMMAND} ${LH_LOSETUP} "${DEVICE}" "${FILE}"
-FDISK_OUT="`fdisk -l -u ${DEVICE} 2>&1`"
+FDISK_OUT="$(fdisk -l -u ${DEVICE} 2>&1)"
${LH_ROOT_COMMAND} ${LH_LOSETUP} -d "${DEVICE}"
-LOOPDEVICE="`echo ${DEVICE}p${PARTITION}`"
+LOOPDEVICE="$(echo ${DEVICE}p${PARTITION})"
if [ "${PARTITION}" = "0" ]
then
@@ -49,8 +49,8 @@ then
${LH_ROOT_COMMAND} ${LH_LOSETUP} "${DEVICE}" "${FILE}"
else
- CYLINDERS="`echo "$FDISK_OUT" | sed -ne "s_^$LOOPDEVICE[ *]*\([0-9]*\).*_\1_p"`"
- OFFSET="`expr ${CYLINDERS} '*' 512`"
+ CYLINDERS="$(echo "$FDISK_OUT" | sed -ne "s_^$LOOPDEVICE[ *]*\([0-9]*\).*_\1_p")"
+ OFFSET="$(expr ${CYLINDERS} '*' 512)"
Echo_message "Mounting ${DEVICE} with offset ${OFFSET}"
diff --git a/helpers/lh_source_debian b/helpers/lh_source_debian
index 8e600007d..8811fa6f1 100755
--- a/helpers/lh_source_debian
+++ b/helpers/lh_source_debian
@@ -98,15 +98,15 @@ rm -f chroot/root/dpkg-selection.txt
# Sort sources
for DSC in chroot/*.dsc
do
- SOURCE="`sed -n 's/^Source: //p' ${DSC}`"
+ SOURCE="$(sed -n 's/^Source: //p' ${DSC})"
case "${SOURCE}" in
lib?*)
- LETTER="`echo ${SOURCE} | sed 's/\(....\).*/\1/'`"
+ LETTER="$(echo ${SOURCE} | sed 's/\(....\).*/\1/')"
;;
*)
- LETTER="`echo ${SOURCE} | sed 's/\(.\).*/\1/'`"
+ LETTER="$(echo ${SOURCE} | sed 's/\(.\).*/\1/')"
;;
esac
diff --git a/helpers/lh_source_debian-live b/helpers/lh_source_debian-live
index d92fe3a6a..acecb6dd6 100755
--- a/helpers/lh_source_debian-live
+++ b/helpers/lh_source_debian-live
@@ -64,7 +64,7 @@ cp -a config source/debian-live
# Create tarball
cd source
-tar cfz debian-live-config_`date +%Y%m%d.%s`.tar.gz debian-live
+tar cfz debian-live-config_$(date +%Y%m%d.%s).tar.gz debian-live
cd "${OLDPWD}"
rm -rf source/debian-live/config
diff --git a/helpers/lh_source_disk b/helpers/lh_source_disk
index e3877494f..3b7a95ac7 100755
--- a/helpers/lh_source_disk
+++ b/helpers/lh_source_disk
@@ -54,10 +54,10 @@ Create_lockfile .lock
mkdir -p source/.disk
-ARCHITECTURE="`echo ${LH_ARCHITECTURE} | sed -e 's# #/#g'`"
-DISTRIBUTION="`echo ${LH_DISTRIBUTION} | cut -b 1 | tr '[a-z]' '[A-Z]'`"
-DISTRIBUTION="${DISTRIBUTION}`echo ${LH_DISTRIBUTION} | cut -b 2-`"
-eval VERSION="$`echo VERSION_${LH_DISTRIBUTION}`"
+ARCHITECTURE="$(echo ${LH_ARCHITECTURE} | sed -e 's# #/#g')"
+DISTRIBUTION="$(echo ${LH_DISTRIBUTION} | cut -b 1 | tr '[a-z]' '[A-Z]')"
+DISTRIBUTION="${DISTRIBUTION}$(echo ${LH_DISTRIBUTION} | cut -b 2-)"
+eval VERSION="$$(echo VERSION_${LH_DISTRIBUTION})"
case "${LH_MODE}" in
debian)
@@ -73,11 +73,11 @@ case "${LH_MODE}" in
TYPE="LIVE"
fi
- echo "Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} ${TYPE} Source `date +%Y%m%d-%H:%M`" > source/.disk/info
+ echo "Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} ${TYPE} Source $(date +%Y%m%d-%H:%M)" > source/.disk/info
;;
ubuntu)
- echo "Ubuntu Linux ${VERSION} \"${DISTRIBUTION}\" - Unofficial ${ARCHITECTURE} LIVE/NETINST Source `date +%Y%m%d-%H:%M`" > source/.disk/info
+ echo "Ubuntu Linux ${VERSION} \"${DISTRIBUTION}\" - Unofficial ${ARCHITECTURE} LIVE/NETINST Source $(date +%Y%m%d-%H:%M)" > source/.disk/info
;;
esac
diff --git a/helpers/lh_source_usb-hdd b/helpers/lh_source_usb-hdd
index ff7839385..dfbf0227b 100755
--- a/helpers/lh_source_usb-hdd
+++ b/helpers/lh_source_usb-hdd
@@ -71,10 +71,10 @@ then
fi
# Everything which comes here needs to be cleaned up,
-DU_DIM="`du -ms source | cut -f1`"
-REAL_DIM="`expr ${DU_DIM} + ${DU_DIM} / 50`" # Just 2% more to be sure, need something more sophistcated here...
+DU_DIM="$(du -ms source | cut -f1)"
+REAL_DIM="$(expr ${DU_DIM} + ${DU_DIM} / 50)" # Just 2% more to be sure, need something more sophistcated here...
dd if=/dev/zero of=source.img bs=1024k count=${REAL_DIM}
-FREELO="`${LH_LOSETUP} -f`"
+FREELO="$(${LH_LOSETUP} -f)"
if [ ! -b chroot/${FREELO} ]
then
MAKEDEV="true"
diff --git a/helpers/lh_testroot b/helpers/lh_testroot
index f213f86c1..327800759 100755
--- a/helpers/lh_testroot
+++ b/helpers/lh_testroot
@@ -34,7 +34,7 @@ Read_conffile "${LH_CONFIG}"
Set_defaults
# Checking user account
-if [ "`${LH_ROOT_COMMAND} id -u`" -ne "0" ]
+if [ "$(${LH_ROOT_COMMAND} id -u)" -ne "0" ]
then
Echo_error "need root privileges"
exit 1