Deprecating all dashed forms of commands.

This commit is contained in:
Daniel Baumann 2009-10-20 20:40:09 +02:00
parent 74f7986e69
commit 82cbc81b3d
15 changed files with 211 additions and 193 deletions

18
functions/legacy.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/sh
# legacy.sh - handle live-helper 2.x warnigns
# Copyright (C) 2006-2009 Daniel Baumann <daniel@debian.org>
#
# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
# This is free software, and you are welcome to redistribute it
# under certain conditions; see COPYING for details.
# Obsoleting 'lh_foo_bar' calls in favour for 'lh foo_bar'
BASENAME="$(basename ${0})"
if [ -z "${LH}" ] && [ "$(echo ${BASENAME} | awk '{ print $1 }')" != "lh" ]
then
Echo_warning "live-helper 2.0 will deprecate all dashed forms of commands."
Echo_warning "Please use \'$(echo ${BASENAME} | sed -e 's|lh_|lh |')\' instead of \'${BASENAME}\'."
fi

View File

@ -36,7 +36,7 @@ case "${1}" in
if [ -x "$(which lh_${COMMAND} 2>/dev/null)" ] if [ -x "$(which lh_${COMMAND} 2>/dev/null)" ]
then then
exec lh_"${COMMAND}" "${@}" LH=1 exec lh_"${COMMAND}" "${@}"
else else
Echo_error "no such helper" Echo_error "no such helper"
exit 1 exit 1

View File

@ -27,69 +27,69 @@ Set_defaults
Setup_cleanup Setup_cleanup
# Preparing root filesystem # Preparing root filesystem
lh_binary_chroot ${*} lh binary_chroot ${*}
if [ "${LH_CHROOT_BUILD}" = "enabled" ] if [ "${LH_CHROOT_BUILD}" = "enabled" ]
then then
# Configuring chroot # Configuring chroot
lh_chroot_devpts install ${*} lh chroot_devpts install ${*}
lh_chroot_proc install ${*} lh chroot_proc install ${*}
lh_chroot_selinuxfs install ${*} lh chroot_selinuxfs install ${*}
lh_chroot_sysfs install ${*} lh chroot_sysfs install ${*}
lh_chroot_hosts install ${*} lh chroot_hosts install ${*}
lh_chroot_resolv install ${*} lh chroot_resolv install ${*}
lh_chroot_hostname install ${*} lh chroot_hostname install ${*}
lh_chroot_apt install-binary ${*} lh chroot_apt install-binary ${*}
lh_chroot_sources install ${*} lh chroot_sources install ${*}
fi fi
# Building root filesystem # Building root filesystem
lh_binary_rootfs ${*} lh binary_rootfs ${*}
lh_binary_manifest ${*} lh binary_manifest ${*}
lh_binary_encryption ${*} lh binary_encryption ${*}
# Prepare images # Prepare images
lh_binary_local-packageslists ${*} lh binary_local-packageslists ${*}
lh_binary_linux-image ${*} lh binary_linux-image ${*}
lh_binary_debian-installer ${*} lh binary_debian-installer ${*}
lh_binary_memtest ${*} lh binary_memtest ${*}
lh_binary_grub ${*} lh binary_grub ${*}
lh_binary_syslinux ${*} lh binary_syslinux ${*}
lh_binary_yaboot ${*} lh binary_yaboot ${*}
lh_binary_silo ${*} lh binary_silo ${*}
lh_binary_disk ${*} lh binary_disk ${*}
lh_binary_win32-loader ${*} lh binary_win32-loader ${*}
lh_binary_includes ${*} lh binary_includes ${*}
lh_binary_local-includes ${*} lh binary_local-includes ${*}
lh_binary_local-hooks ${*} lh binary_local-hooks ${*}
lh_binary_md5sum ${*} lh binary_md5sum ${*}
if [ "${LH_CHROOT_BUILD}" != "enabled" ] if [ "${LH_CHROOT_BUILD}" != "enabled" ]
then then
lh_chroot_devpts install ${*} lh chroot_devpts install ${*}
lh_chroot_proc install ${*} lh chroot_proc install ${*}
lh_chroot_selinuxfs install ${*} lh chroot_selinuxfs install ${*}
lh_chroot_sysfs install ${*} lh chroot_sysfs install ${*}
fi fi
# Building images # Building images
lh_binary_iso ${*} lh binary_iso ${*}
lh_binary_net ${*} lh binary_net ${*}
lh_binary_tar ${*} lh binary_tar ${*}
lh_binary_usb-hdd ${*} lh binary_usb-hdd ${*}
lh_binary_virtual-hdd ${*} lh binary_virtual-hdd ${*}
if [ "${LH_CHROOT_BUILD}" = "enabled" ] if [ "${LH_CHROOT_BUILD}" = "enabled" ]
then then
# Deconfiguring chroot # Deconfiguring chroot
rm -f .stage/chroot_sources rm -f .stage/chroot_sources
lh_chroot_hostname remove ${*} lh chroot_hostname remove ${*}
lh_chroot_resolv remove ${*} lh chroot_resolv remove ${*}
lh_chroot_hosts remove ${*} lh chroot_hosts remove ${*}
fi fi
lh_chroot_apt remove ${*} lh chroot_apt remove ${*}
lh_chroot_sysfs remove ${*} lh chroot_sysfs remove ${*}
lh_chroot_selinuxfs remove ${*} lh chroot_selinuxfs remove ${*}
lh_chroot_proc remove ${*} lh chroot_proc remove ${*}
lh_chroot_devpts remove ${*} lh chroot_devpts remove ${*}

View File

@ -152,34 +152,34 @@ case "${LH_CHROOT_FILESYSTEM}" in
rm -f .lock rm -f .lock
mv chroot/chroot chroot.tmp mv chroot/chroot chroot.tmp
lh_chroot_linux-image remove ${*} lh chroot_linux-image remove ${*}
lh_chroot_sources remove ${*} lh chroot_sources remove ${*}
lh_chroot_apt remove ${*} lh chroot_apt remove ${*}
lh_chroot_hostname remove ${*} lh chroot_hostname remove ${*}
lh_chroot_resolv remove ${*} lh chroot_resolv remove ${*}
lh_chroot_hosts remove ${*} lh chroot_hosts remove ${*}
lh_chroot_sysv-rc remove ${*} lh chroot_sysv-rc remove ${*}
lh_chroot_debianchroot remove ${*} lh chroot_debianchroot remove ${*}
lh_chroot_sysfs remove ${*} lh chroot_sysfs remove ${*}
lh_chroot_selinuxfs remove ${*} lh chroot_selinuxfs remove ${*}
lh_chroot_proc remove ${*} lh chroot_proc remove ${*}
lh_chroot_devpts remove ${*} lh chroot_devpts remove ${*}
rm -rf chroot rm -rf chroot
mv chroot.tmp chroot mv chroot.tmp chroot
lh_chroot_devpts install ${*} lh chroot_devpts install ${*}
lh_chroot_proc install ${*} lh chroot_proc install ${*}
lh_chroot_selinuxfs install ${*} lh chroot_selinuxfs install ${*}
lh_chroot_sysfs install ${*} lh chroot_sysfs install ${*}
lh_chroot_debianchroot install ${*} lh chroot_debianchroot install ${*}
lh_chroot_sysv-rc install ${*} lh chroot_sysv-rc install ${*}
lh_chroot_hosts install ${*} lh chroot_hosts install ${*}
lh_chroot_resolv install ${*} lh chroot_resolv install ${*}
lh_chroot_hostname install ${*} lh chroot_hostname install ${*}
lh_chroot_apt install ${*} lh chroot_apt install ${*}
lh_chroot_sources install ${*} lh chroot_sources install ${*}
lh_chroot_linux-image install ${*} lh chroot_linux-image install ${*}
touch .lock touch .lock
else else
@ -232,34 +232,34 @@ case "${LH_CHROOT_FILESYSTEM}" in
rm -f .lock rm -f .lock
mv chroot/chroot chroot.tmp mv chroot/chroot chroot.tmp
lh_chroot_linux-image remove ${*} lh chroot_linux-image remove ${*}
lh_chroot_sources remove ${*} lh chroot_sources remove ${*}
lh_chroot_apt remove ${*} lh chroot_apt remove ${*}
lh_chroot_hostname remove ${*} lh chroot_hostname remove ${*}
lh_chroot_resolv remove ${*} lh chroot_resolv remove ${*}
lh_chroot_hosts remove ${*} lh chroot_hosts remove ${*}
lh_chroot_sysv-rc remove ${*} lh chroot_sysv-rc remove ${*}
lh_chroot_debianchroot remove ${*} lh chroot_debianchroot remove ${*}
lh_chroot_sysfs remove ${*} lh chroot_sysfs remove ${*}
lh_chroot_selinuxfs remove ${*} lh chroot_selinuxfs remove ${*}
lh_chroot_proc remove ${*} lh chroot_proc remove ${*}
lh_chroot_devpts remove ${*} lh chroot_devpts remove ${*}
rm -rf chroot rm -rf chroot
mv chroot.tmp chroot mv chroot.tmp chroot
lh_chroot_devpts install ${*} lh chroot_devpts install ${*}
lh_chroot_proc install ${*} lh chroot_proc install ${*}
lh_chroot_selinuxfs install ${*} lh chroot_selinuxfs install ${*}
lh_chroot_sysfs install ${*} lh chroot_sysfs install ${*}
lh_chroot_debianchroot install ${*} lh chroot_debianchroot install ${*}
lh_chroot_sysv-rc install ${*} lh chroot_sysv-rc install ${*}
lh_chroot_hosts install ${*} lh chroot_hosts install ${*}
lh_chroot_resolv install ${*} lh chroot_resolv install ${*}
lh_chroot_hostname install ${*} lh chroot_hostname install ${*}
lh_chroot_apt install ${*} lh chroot_apt install ${*}
lh_chroot_sources install ${*} lh chroot_sources install ${*}
lh_chroot_linux-image install ${*} lh chroot_linux-image install ${*}
else else
rm -rf chroot/chroot rm -rf chroot/chroot
fi fi
@ -343,34 +343,34 @@ case "${LH_CHROOT_FILESYSTEM}" in
rm -f .lock rm -f .lock
mv chroot/chroot chroot.tmp mv chroot/chroot chroot.tmp
lh_chroot_linux-image remove ${*} lh chroot_linux-image remove ${*}
lh_chroot_sources remove ${*} lh chroot_sources remove ${*}
lh_chroot_apt remove ${*} lh chroot_apt remove ${*}
lh_chroot_hostname remove ${*} lh chroot_hostname remove ${*}
lh_chroot_resolv remove ${*} lh chroot_resolv remove ${*}
lh_chroot_hosts remove ${*} lh chroot_hosts remove ${*}
lh_chroot_sysv-rc remove ${*} lh chroot_sysv-rc remove ${*}
lh_chroot_debianchroot remove ${*} lh chroot_debianchroot remove ${*}
lh_chroot_sysfs remove ${*} lh chroot_sysfs remove ${*}
lh_chroot_selinuxfs remove ${*} lh chroot_selinuxfs remove ${*}
lh_chroot_proc remove ${*} lh chroot_proc remove ${*}
lh_chroot_devpts remove ${*} lh chroot_devpts remove ${*}
rm -rf chroot rm -rf chroot
mv chroot.tmp chroot mv chroot.tmp chroot
lh_chroot_devpts install ${*} lh chroot_devpts install ${*}
lh_chroot_proc install ${*} lh chroot_proc install ${*}
lh_chroot_selinuxfs install ${*} lh chroot_selinuxfs install ${*}
lh_chroot_sysfs install ${*} lh chroot_sysfs install ${*}
lh_chroot_debianchroot install ${*} lh chroot_debianchroot install ${*}
lh_chroot_sysv-rc install ${*} lh chroot_sysv-rc install ${*}
lh_chroot_hosts install ${*} lh chroot_hosts install ${*}
lh_chroot_resolv install ${*} lh chroot_resolv install ${*}
lh_chroot_hostname install ${*} lh chroot_hostname install ${*}
lh_chroot_apt install ${*} lh chroot_apt install ${*}
lh_chroot_sources install ${*} lh chroot_sources install ${*}
lh_chroot_linux-image install ${*} lh chroot_linux-image install ${*}
touch .lock touch .lock
else else

View File

@ -27,8 +27,8 @@ Set_defaults
Setup_cleanup Setup_cleanup
# Bootstrapping system # Bootstrapping system
lh_bootstrap_cache restore ${*} lh bootstrap_cache restore ${*}
lh_bootstrap_copy ${*} lh bootstrap_copy ${*}
lh_bootstrap_cdebootstrap ${*} lh bootstrap_cdebootstrap ${*}
lh_bootstrap_debootstrap ${*} lh bootstrap_debootstrap ${*}
lh_bootstrap_cache save ${*} lh bootstrap_cache save ${*}

View File

@ -36,7 +36,7 @@ Echo_message "Begin bootstrapping system..."
Check_package /usr/bin/${LH_BOOTSTRAP} cdebootstrap Check_package /usr/bin/${LH_BOOTSTRAP} cdebootstrap
# Ensure that a system is built as root # Ensure that a system is built as root
lh_testroot lh testroot
# Checking stage file # Checking stage file
Check_stagefile .stage/bootstrap Check_stagefile .stage/bootstrap

View File

@ -34,7 +34,7 @@ Check_crossarchitecture
Echo_message "Begin bootstrapping system..." Echo_message "Begin bootstrapping system..."
# Ensure that a system is built as root # Ensure that a system is built as root
lh_testroot lh testroot
# Checking stage file # Checking stage file
Check_stagefile .stage/bootstrap Check_stagefile .stage/bootstrap

View File

@ -36,7 +36,7 @@ Echo_message "Begin bootstrapping system..."
Check_package /usr/sbin/debootstrap debootstrap Check_package /usr/sbin/debootstrap debootstrap
# Ensure that a system is built as root # Ensure that a system is built as root
lh_testroot lh testroot
# Checking stage file # Checking stage file
Check_stagefile .stage/bootstrap Check_stagefile .stage/bootstrap

View File

@ -55,13 +55,13 @@ Set_defaults
Check_defaults Check_defaults
# Bootstrapping system # Bootstrapping system
lh_bootstrap ${*} lh bootstrap ${*}
# Customizing chroot # Customizing chroot
lh_chroot ${*} lh chroot ${*}
# Building binary images # Building binary images
lh_binary ${*} lh binary ${*}
# Building source images # Building source images
lh_source ${*} lh source ${*}

View File

@ -27,51 +27,51 @@ Set_defaults
Setup_cleanup Setup_cleanup
# Configuring chroot # Configuring chroot
lh_chroot_cache restore ${*} lh chroot_cache restore ${*}
lh_chroot_devpts install ${*} lh chroot_devpts install ${*}
lh_chroot_proc install ${*} lh chroot_proc install ${*}
lh_chroot_selinuxfs install ${*} lh chroot_selinuxfs install ${*}
lh_chroot_sysfs install ${*} lh chroot_sysfs install ${*}
lh_chroot_debianchroot install ${*} lh chroot_debianchroot install ${*}
lh_chroot_dpkg install ${*} lh chroot_dpkg install ${*}
lh_chroot_sysv-rc install ${*} lh chroot_sysv-rc install ${*}
lh_chroot_hosts install ${*} lh chroot_hosts install ${*}
lh_chroot_resolv install ${*} lh chroot_resolv install ${*}
lh_chroot_hostname install ${*} lh chroot_hostname install ${*}
lh_chroot_apt install ${*} lh chroot_apt install ${*}
lh_chroot_sources install ${*} lh chroot_sources install ${*}
lh_chroot_linux-image install ${*} lh chroot_linux-image install ${*}
# Customizing chroot # Customizing chroot
lh_chroot_preseed ${*} lh chroot_preseed ${*}
lh_chroot_local-preseed ${*} lh chroot_local-preseed ${*}
lh_chroot_tasks ${*} lh chroot_tasks ${*}
lh_chroot_packageslists ${*} lh chroot_packageslists ${*}
lh_chroot_packages ${*} lh chroot_packages ${*}
lh_chroot_local-packages ${*} lh chroot_local-packages ${*}
lh_chroot_install-packages ${*} lh chroot_install-packages ${*}
lh_chroot_localization ${*} lh chroot_localization ${*}
lh_chroot_local-includes ${*} lh chroot_local-includes ${*}
lh_chroot_local-patches ${*} lh chroot_local-patches ${*}
lh_chroot_sysvinit ${*} lh chroot_sysvinit ${*}
lh_chroot_local-hooks ${*} lh chroot_local-hooks ${*}
lh_chroot_hooks ${*} lh chroot_hooks ${*}
lh_chroot_symlinks ${*} lh chroot_symlinks ${*}
lh_chroot_hacks ${*} lh chroot_hacks ${*}
lh_chroot_interactive ${*} lh chroot_interactive ${*}
# Deconfiguring chroot # Deconfiguring chroot
lh_chroot_linux-image remove ${*} lh chroot_linux-image remove ${*}
lh_chroot_sources remove ${*} lh chroot_sources remove ${*}
lh_chroot_apt remove ${*} lh chroot_apt remove ${*}
lh_chroot_hostname remove ${*} lh chroot_hostname remove ${*}
lh_chroot_resolv remove ${*} lh chroot_resolv remove ${*}
lh_chroot_hosts remove ${*} lh chroot_hosts remove ${*}
lh_chroot_sysv-rc remove ${*} lh chroot_sysv-rc remove ${*}
lh_chroot_dpkg remove ${*} lh chroot_dpkg remove ${*}
lh_chroot_debianchroot remove ${*} lh chroot_debianchroot remove ${*}
lh_chroot_sysfs remove ${*} lh chroot_sysfs remove ${*}
lh_chroot_selinuxfs remove ${*} lh chroot_selinuxfs remove ${*}
lh_chroot_proc remove ${*} lh chroot_proc remove ${*}
lh_chroot_devpts remove ${*} lh chroot_devpts remove ${*}
lh_chroot_cache save ${*} lh chroot_cache save ${*}

View File

@ -20,7 +20,7 @@ USAGE="${PROGRAM} {install|remove} [--force]"
Arguments "${@}" Arguments "${@}"
# Ensure that a system is built as root # Ensure that a system is built as root
lh_testroot lh testroot
# Reading configuration files # Reading configuration files
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source

View File

@ -20,7 +20,7 @@ USAGE="${PROGRAM} {install|remove} [--force]"
Arguments "${@}" Arguments "${@}"
# Ensure that a system is built as root # Ensure that a system is built as root
lh_testroot lh testroot
# Reading configuration files # Reading configuration files
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source

View File

@ -20,7 +20,7 @@ USAGE="${PROGRAM} {install|remove} [--force]"
Arguments "${@}" Arguments "${@}"
# Ensure that a system is built as root # Ensure that a system is built as root
lh_testroot lh testroot
# Reading configuration files # Reading configuration files
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source

View File

@ -20,7 +20,7 @@ USAGE="${PROGRAM} {install|remove} [--force]"
Arguments "${@}" Arguments "${@}"
# Ensure that a system is built as root # Ensure that a system is built as root
lh_testroot lh testroot
# Reading configuration files # Reading configuration files
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source

View File

@ -29,26 +29,26 @@ Require_stagefile .stage/chroot_install-packages
Setup_cleanup Setup_cleanup
# Enabling network in chroot # Enabling network in chroot
lh_chroot_hosts install ${*} lh chroot_hosts install ${*}
lh_chroot_resolv install ${*} lh chroot_resolv install ${*}
lh_chroot_hostname install ${*} lh chroot_hostname install ${*}
lh_chroot_sources install ${*} lh chroot_sources install ${*}
# Preparing images # Preparing images
lh_source_debian-live ${*} lh source_debian-live ${*}
lh_source_debian ${*} lh source_debian ${*}
lh_source_disk ${*} lh source_disk ${*}
lh_source_md5sum ${*} lh source_md5sum ${*}
# Building images # Building images
lh_source_iso ${*} lh source_iso ${*}
lh_source_net ${*} lh source_net ${*}
lh_source_tar ${*} lh source_tar ${*}
lh_source_usb-hdd ${*} lh source_usb-hdd ${*}
lh_source_virtual-hdd ${*} lh source_virtual-hdd ${*}
# Deconfiguring chroot # Deconfiguring chroot
rm -f .stage/chroot_sources rm -f .stage/chroot_sources
lh_chroot_hostname remove ${*} lh chroot_hostname remove ${*}
lh_chroot_resolv remove ${*} lh chroot_resolv remove ${*}
lh_chroot_hosts remove ${*} lh chroot_hosts remove ${*}