diff options
author | Daniel Baumann <daniel@debian.org> | 2009-11-22 14:36:42 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2009-11-22 14:38:00 +0100 |
commit | a62f12110b19a52a58d7eae871012202cfa16055 (patch) | |
tree | 0bd188079c808ee8956fb5304c46ce8266b49f75 /functions/chroot.sh | |
download | vyos-live-build-a62f12110b19a52a58d7eae871012202cfa16055.tar.gz vyos-live-build-a62f12110b19a52a58d7eae871012202cfa16055.zip |
Renaming categories to archive areas (Closes: #519690).
Diffstat (limited to 'functions/chroot.sh')
-rwxr-xr-x | functions/chroot.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/functions/chroot.sh b/functions/chroot.sh new file mode 100755 index 000000000..420abe18a --- /dev/null +++ b/functions/chroot.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +# chroot.sh - /usr/sbin/chroot wrapper script +# 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. + +Chroot () +{ + CHROOT="${1}"; shift + COMMANDS="${@}" + + # Executing commands in chroot + Echo_debug "Executing: %s" "${COMMANDS}" + + if [ "${LH_USE_FAKEROOT}" != "enabled" ] + then + ${LH_ROOT_COMMAND} chroot "${CHROOT}" /usr/bin/env -i HOME="/root" PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" TERM="${TERM}" ftp_proxy="${LH_APT_FTP_PROXY}" http_proxy="${LH_APT_HTTP_PROXY}" DEBIAN_FRONTEND="${LH_DEBCONF_FRONTEND}" DEBIAN_PRIORITY="${LH_DEBCONF_PRIORITY}" DEBCONF_NOWARNINGS="${LH_DEBCONF_NOWARNINGS}" XORG_CONFIG="custom" ${COMMANDS} + else + # Building with fakeroot/fakechroot + ${LH_ROOT_COMMAND} chroot "${CHROOT}" ${COMMANDS} + fi + + return "${?}" +} |