diff options
Diffstat (limited to 'functions')
-rwxr-xr-x | functions/chroot.sh | 4 | ||||
-rwxr-xr-x | functions/defaults.sh | 13 | ||||
-rwxr-xr-x | functions/losetup.sh | 10 |
3 files changed, 7 insertions, 20 deletions
diff --git a/functions/chroot.sh b/functions/chroot.sh index c166fdd2e..901bd82ff 100755 --- a/functions/chroot.sh +++ b/functions/chroot.sh @@ -28,10 +28,10 @@ Chroot () if [ "${LB_USE_FAKEROOT}" != "true" ] then - ${LB_ROOT_COMMAND} ${_LINUX32} chroot "${CHROOT}" /usr/bin/env -i HOME="/root" PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" TERM="${TERM}" DEBIAN_FRONTEND="${LB_DEBCONF_FRONTEND}" DEBIAN_PRIORITY="${LB_DEBCONF_PRIORITY}" DEBCONF_NONINTERACTIVE_SEEN="true" DEBCONF_NOWARNINGS="true" ${ENV} ${COMMANDS} + ${_LINUX32} chroot "${CHROOT}" /usr/bin/env -i HOME="/root" PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" TERM="${TERM}" DEBIAN_FRONTEND="${LB_DEBCONF_FRONTEND}" DEBIAN_PRIORITY="${LB_DEBCONF_PRIORITY}" DEBCONF_NONINTERACTIVE_SEEN="true" DEBCONF_NOWARNINGS="true" ${ENV} ${COMMANDS} else # Building with fakeroot/fakechroot - ${LB_ROOT_COMMAND} ${_LINUX32} chroot "${CHROOT}" ${ENV} ${COMMANDS} + ${_LINUX32} chroot "${CHROOT}" ${ENV} ${COMMANDS} fi return "${?}" diff --git a/functions/defaults.sh b/functions/defaults.sh index 1f2b5fabf..592e5a1fc 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -322,19 +322,6 @@ Set_defaults () fi fi - if [ "$(id -u)" = "0" ] - then - # If we are root, disable root command - LB_ROOT_COMMAND="" - else - if [ -x /usr/bin/sudo ] - then - # FIXME: this is false until considered safe - #LB_ROOT_COMMAND="sudo" - LB_ROOT_COMMAND="" - fi - fi - if [ "${LIVE_IMAGE_ARCHITECTURE}" = "i386" ] && [ "${CURRENT_IMAGE_ARCHITECTURE}" = "amd64" ] then # Use linux32 when building amd64 images on i386 diff --git a/functions/losetup.sh b/functions/losetup.sh index 48c7542b2..3b389c3cf 100755 --- a/functions/losetup.sh +++ b/functions/losetup.sh @@ -23,7 +23,7 @@ Lodetach () # a race condition. We call 'udevadm settle' to help avoid this. if [ -x "$(which udevadm 2>/dev/null)" ] then - ${LB_ROOT_COMMAND} udevadm settle + udevadm settle fi # Loop back devices aren't the most reliable when it comes to writes. @@ -31,7 +31,7 @@ Lodetach () sync sleep 1 - ${LB_ROOT_COMMAND} ${LB_LOSETUP} -d "${DEVICE}" || Lodetach "${DEVICE}" "$(expr ${ATTEMPT} + 1)" + ${LB_LOSETUP} -d "${DEVICE}" || Lodetach "${DEVICE}" "$(expr ${ATTEMPT} + 1)" } Losetup () @@ -40,7 +40,7 @@ Losetup () FILE="${2}" PARTITION="${3:-1}" - ${LB_ROOT_COMMAND} ${LB_LOSETUP} --read-only "${DEVICE}" "${FILE}" + ${LB_LOSETUP} --read-only "${DEVICE}" "${FILE}" FDISK_OUT="$(${LB_FDISK} -l -u ${DEVICE} 2>&1)" Lodetach "${DEVICE}" @@ -50,14 +50,14 @@ Losetup () then Echo_message "Mounting %s with offset 0" "${DEVICE}" - ${LB_ROOT_COMMAND} ${LB_LOSETUP} "${DEVICE}" "${FILE}" + ${LB_LOSETUP} "${DEVICE}" "${FILE}" else SECTORS="$(echo "$FDISK_OUT" | sed -ne "s|^$LOOPDEVICE[ *]*\([0-9]*\).*|\1|p")" OFFSET="$(expr ${SECTORS} '*' 512)" Echo_message "Mounting %s with offset %s" "${DEVICE}" "${OFFSET}" - ${LB_ROOT_COMMAND} ${LB_LOSETUP} -o "${OFFSET}" "${DEVICE}" "${FILE}" + ${LB_LOSETUP} -o "${OFFSET}" "${DEVICE}" "${FILE}" fi } |