summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2013-02-18 11:29:04 +0100
committerDaniel Baumann <mail@daniel-baumann.ch>2013-05-06 14:50:06 +0200
commit04cec317cc4437eed514f4277f6779010e587662 (patch)
tree16e00a5358affa5a5b906f2c0d3f38d628ab0b2e /scripts
parent3f3d05b2e654a4ec312cb121c991b8c010bf3db1 (diff)
downloadvyos-live-build-04cec317cc4437eed514f4277f6779010e587662.tar.gz
vyos-live-build-04cec317cc4437eed514f4277f6779010e587662.zip
Removing incomplete support for root-command.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build/binary_chroot23
-rwxr-xr-xscripts/build/binary_debian-installer4
-rwxr-xr-xscripts/build/binary_hdd4
-rwxr-xr-xscripts/build/binary_rootfs33
-rwxr-xr-xscripts/build/bootstrap_cache14
-rwxr-xr-xscripts/build/bootstrap_cdebootstrap16
-rwxr-xr-xscripts/build/bootstrap_debootstrap16
-rwxr-xr-xscripts/build/chroot_cache14
-rwxr-xr-xscripts/build/chroot_devpts6
-rwxr-xr-xscripts/build/chroot_dpkg12
-rwxr-xr-xscripts/build/chroot_hacks5
-rwxr-xr-xscripts/build/chroot_proc6
-rwxr-xr-xscripts/build/chroot_selinuxfs4
-rwxr-xr-xscripts/build/chroot_sysfs4
-rwxr-xr-xscripts/build/clean34
-rwxr-xr-xscripts/build/config12
-rwxr-xr-xscripts/build/source_hdd4
-rwxr-xr-xscripts/build/testroot2
18 files changed, 69 insertions, 144 deletions
diff --git a/scripts/build/binary_chroot b/scripts/build/binary_chroot
index 87986c0a7..fb7c7546a 100755
--- a/scripts/build/binary_chroot
+++ b/scripts/build/binary_chroot
@@ -43,7 +43,7 @@ if [ -f chroot/proc/version ]
then
if [ "${LB_USE_FAKEROOT}" != "true" ]
then
- ${LB_ROOT_COMMAND} umount chroot/proc
+ umount chroot/proc
else
rm -rf chroot/proc
mkdir -p chroot/proc
@@ -54,7 +54,7 @@ if [ -d chroot/sys/kernel ]
then
if [ "${LB_USE_FAKEROOT}" != "true" ]
then
- ${LB_ROOT_COMMAND} umount chroot/sys
+ umount chroot/sys
else
rm -rf chroot/sys
mkdir -p chroot/sys
@@ -81,20 +81,20 @@ fi
Echo_message "This may take a while."
# Removing old chroot
-${LB_ROOT_COMMAND} rm -rf chroot/chroot
-${LB_ROOT_COMMAND} rm -rf chroot.tmp
+rm -rf chroot/chroot
+rm -rf chroot.tmp
# Copying new chroot
if [ -d cache/bootstrap ] && [ "${LB_CHROOT_FILESYSTEM}" != "none" ] && [ "${LB_CHROOT_FILESYSTEM}" != "plain" ]
then
- ${LB_ROOT_COMMAND} mv chroot chroot.tmp
- ${LB_ROOT_COMMAND} cp -a cache/bootstrap chroot
- ${LB_ROOT_COMMAND} touch chroot/chroot.cache
+ mv chroot chroot.tmp
+ cp -a cache/bootstrap chroot
+ touch chroot/chroot.cache
else
- ${LB_ROOT_COMMAND} cp -a chroot chroot.tmp
+ cp -a chroot chroot.tmp
fi
-${LB_ROOT_COMMAND} mv chroot.tmp chroot/chroot
+mv chroot.tmp chroot/chroot
# Handling chroot excludes
if [ -f config/rootfs/excludes ] && [ "${LB_CHROOT_FILESYSTEM}" != "squashfs" ]
@@ -116,10 +116,5 @@ then
esac
fi
-if [ -n "${LB_ROOT_COMMAND}" ]
-then
- ${LB_ROOT_COMMAND} chown -R $(whoami):$(whoami) chroot
-fi
-
# Creating stage file
Create_stagefile .build/binary_chroot
diff --git a/scripts/build/binary_debian-installer b/scripts/build/binary_debian-installer
index aed689143..39385c3da 100755
--- a/scripts/build/binary_debian-installer
+++ b/scripts/build/binary_debian-installer
@@ -290,12 +290,12 @@ then
Download_file mini.iso ${URL}/mini.iso
mkdir mini.tmp
- ${LB_ROOT_COMMAND} mount -o loop -t iso9660 mini.iso mini.tmp
+ mount -o loop -t iso9660 mini.iso mini.tmp
cp mini.tmp/boot/vmlinuz-${DEFAULT_FLAVOUR} "${DESTDIR}"/"${VMLINUZ_DI}"
cp mini.tmp/boot/initrd.gz "${DESTDIR}"/"${INITRD_DI}"
- ${LB_ROOT_COMMAND} umount mini.tmp
+ umount mini.tmp
rm -rf mini.tmp mini.iso
else
# Downloading debian-installer
diff --git a/scripts/build/binary_hdd b/scripts/build/binary_hdd
index f6fb3d8f1..972058aa5 100755
--- a/scripts/build/binary_hdd
+++ b/scripts/build/binary_hdd
@@ -234,7 +234,7 @@ case "${LB_BINARY_FILESYSTEM}" in
esac
mkdir -p chroot/binary.tmp
-${LB_ROOT_COMMAND} mount ${FREELO} chroot/binary.tmp
+mount ${FREELO} chroot/binary.tmp
cp -r -T ${CP_OPTIONS} binary/ chroot/binary.tmp
FIXME()
@@ -268,7 +268,7 @@ EOF
fi
}
-${LB_ROOT_COMMAND} umount chroot/binary.tmp
+umount chroot/binary.tmp
rmdir chroot/binary.tmp
if [ "${LB_BOOTLOADER}" = "syslinux" ]
diff --git a/scripts/build/binary_rootfs b/scripts/build/binary_rootfs
index 3dfdeb2c1..10d77c55e 100755
--- a/scripts/build/binary_rootfs
+++ b/scripts/build/binary_rootfs
@@ -74,12 +74,7 @@ do
# Restoring old cache
mkdir -p binary/"${INITFS}"
- ${LB_ROOT_COMMAND} cp -a cache/binary_rootfs/filesystem.* binary/"${INITFS}"
-
- if [ -n "${LB_ROOT_COMMAND}" ]
- then
- ${LB_ROOT_COMMAND} chown -R $(whoami):$(whoami) binary
- fi
+ cp -a cache/binary_rootfs/filesystem.* binary/"${INITFS}"
# Creating stage file
Create_stagefile .build/binary_rootfs
@@ -132,7 +127,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
Chroot chroot "mkfs.${LB_CHROOT_FILESYSTEM} -F -b 1024 -N ${REAL_INODES} -m 0 filesystem.${LB_CHROOT_FILESYSTEM}"
mkdir -p filesystem.tmp
- ${LB_ROOT_COMMAND} mount -o loop chroot/filesystem.${LB_CHROOT_FILESYSTEM} filesystem.tmp
+ mount -o loop chroot/filesystem.${LB_CHROOT_FILESYSTEM} filesystem.tmp
cp -a chroot/chroot/* filesystem.tmp
if [ "${FAKE_MTAB}" = "true" ]
@@ -140,7 +135,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
Chroot chroot "rm -f /etc/mtab"
fi
- ${LB_ROOT_COMMAND} umount filesystem.tmp
+ umount filesystem.tmp
rmdir filesystem.tmp
# Move image
@@ -202,10 +197,10 @@ case "${LB_CHROOT_FILESYSTEM}" in
mkfs.${LB_CHROOT_FILESYSTEM} -F -b 1024 -N ${REAL_INODES} -m 0 binary/${INITFS}/filesystem.${LB_CHROOT_FILESYSTEM}
mkdir -p filesystem.tmp
- ${LB_ROOT_COMMAND} mount -o loop binary/${INITFS}/filesystem.${LB_CHROOT_FILESYSTEM} filesystem.tmp
+ mount -o loop binary/${INITFS}/filesystem.${LB_CHROOT_FILESYSTEM} filesystem.tmp
cp -a chroot/* filesystem.tmp
- ${LB_ROOT_COMMAND} umount filesystem.tmp
+ umount filesystem.tmp
rmdir filesystem.tmp
;;
esac
@@ -383,8 +378,8 @@ case "${LB_CHROOT_FILESYSTEM}" in
esac
# Move image
- ${LB_ROOT_COMMAND} mv chroot/filesystem.squashfs binary/${INITFS}
- ${LB_ROOT_COMMAND} rm -f chroot/squashfs.sort
+ mv chroot/filesystem.squashfs binary/${INITFS}
+ rm -f chroot/squashfs.sort
if [ -e chroot/chroot.cache ]
then
@@ -430,7 +425,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
Remove_package
fi
- ${LB_ROOT_COMMAND} chmod 0644 binary/${INITFS}/filesystem.squashfs
+ chmod 0644 binary/${INITFS}/filesystem.squashfs
;;
false)
@@ -449,11 +444,6 @@ case "${LB_CHROOT_FILESYSTEM}" in
;;
esac
- if [ -n "${LB_ROOT_COMMAND}" ]
- then
- ${LB_ROOT_COMMAND} chown -R $(whoami):$(whoami) binary/${INITFS}
- fi
-
# Saving cache
Save_cache cache/packages.binary
;;
@@ -488,12 +478,7 @@ do
if [ "${LB_CHROOT_FILESYSTEM}" != "none" ]
then
- ${LB_ROOT_COMMAND} cp -a binary/"${INITFS}"/filesystem.* cache/binary_rootfs
- fi
-
- if [ -n "${LB_ROOT_COMMAND}" ]
- then
- ${LB_ROOT_COMMAND} chown -R $(whoami):$(whoami) cache/binary_rootfs
+ cp -a binary/"${INITFS}"/filesystem.* cache/binary_rootfs
fi
fi
done
diff --git a/scripts/build/bootstrap_cache b/scripts/build/bootstrap_cache
index 7eae975fe..30e876d22 100755
--- a/scripts/build/bootstrap_cache
+++ b/scripts/build/bootstrap_cache
@@ -50,12 +50,7 @@ do
rm -rf chroot
# Restoring old cache
- ${LB_ROOT_COMMAND} cp -a cache/bootstrap chroot
-
- if [ -n "${LB_ROOT_COMMAND}" ]
- then
- ${LB_ROOT_COMMAND} chown -R $(whoami):$(whoami) chroot
- fi
+ cp -a cache/bootstrap chroot
# Creating stage file
Create_stagefile .build/bootstrap_cache.restore
@@ -81,12 +76,7 @@ do
mkdir -p cache
- ${LB_ROOT_COMMAND} cp -a chroot cache/bootstrap
-
- if [ -n "${LB_ROOT_COMMAND}" ]
- then
- ${LB_ROOT_COMMAND} chown -R $(whoami):$(whoami) cache/bootstrap
- fi
+ cp -a chroot cache/bootstrap
# Creating stage file
Create_stagefile .build/bootstrap_cache.save
diff --git a/scripts/build/bootstrap_cdebootstrap b/scripts/build/bootstrap_cdebootstrap
index 6822629ce..d516b55ca 100755
--- a/scripts/build/bootstrap_cdebootstrap
+++ b/scripts/build/bootstrap_cdebootstrap
@@ -97,12 +97,7 @@ then
fi
Echo_breakage "Running ${LB_BOOTSTRAP} (download-only)... "
- ${LB_ROOT_COMMAND} ${LB_BOOTSTRAP} ${CDEBOOTSTRAP_OPTIONS} --download-only "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}"
-
- if [ -n "${LB_ROOT_COMMAND}" ]
- then
- ${LB_ROOT_COMMAND} chown -R $(whoami):$(whoami) chroot
- fi
+ ${LB_BOOTSTRAP} ${CDEBOOTSTRAP_OPTIONS} --download-only "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}"
# Removing old cache
rm -f cache/packages.bootstrap/*.deb
@@ -123,18 +118,13 @@ then
fi
Echo_message "Bootstrap will be foreign"
- ${LB_ROOT_COMMAND} ${LB_BOOTSTRAP} ${CDEBOOTSTRAP_OPTIONS} --foreign "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}"
+ ${LB_BOOTSTRAP} ${CDEBOOTSTRAP_OPTIONS} --foreign "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}"
Echo_message "Running debootstrap second stage under QEMU"
cp ${LB_BOOTSTRAP_QEMU_STATIC} chroot/usr/bin
Chroot chroot /bin/sh /sbin/cdebootstrap-foreign
else
- ${LB_ROOT_COMMAND} ${LB_BOOTSTRAP} ${CDEBOOTSTRAP_OPTIONS} "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}"
- fi
-
- if [ -n "${LB_ROOT_COMMAND}" ]
- then
- ${LB_ROOT_COMMAND} chown -R $(whoami):$(whoami) chroot
+ ${LB_BOOTSTRAP} ${CDEBOOTSTRAP_OPTIONS} "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}"
fi
# Deconfiguring cdebootstrap configurations
diff --git a/scripts/build/bootstrap_debootstrap b/scripts/build/bootstrap_debootstrap
index ebfd7bf61..5f7df4b09 100755
--- a/scripts/build/bootstrap_debootstrap
+++ b/scripts/build/bootstrap_debootstrap
@@ -101,12 +101,7 @@ then
fi
Echo_breakage "Running debootstrap (download-only)... "
- ${LB_ROOT_COMMAND} debootstrap ${DEBOOTSTRAP_OPTIONS} --download-only "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}"
-
- if [ -n "${LB_ROOT_COMMAND}" ]
- then
- ${LB_ROOT_COMMAND} chown -R $(whoami):$(whoami) chroot
- fi
+ debootstrap ${DEBOOTSTRAP_OPTIONS} --download-only "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}"
# Removing old cache
rm -f cache/packages.bootstrap/*.deb
@@ -127,18 +122,13 @@ then
fi
Echo_message "Bootstrap will be foreign"
- ${LB_ROOT_COMMAND} debootstrap ${DEBOOTSTRAP_OPTIONS} --foreign "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}"
+ debootstrap ${DEBOOTSTRAP_OPTIONS} --foreign "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}"
Echo_message "Running debootstrap second stage under QEMU"
cp ${LB_BOOTSTRAP_QEMU_STATIC} chroot/usr/bin
Chroot chroot /bin/sh /debootstrap/debootstrap --second-stage
else
- ${LB_ROOT_COMMAND} debootstrap ${DEBOOTSTRAP_OPTIONS} "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}"
- fi
-
- if [ -n "${LB_ROOT_COMMAND}" ]
- then
- ${LB_ROOT_COMMAND} chown -R $(whoami):$(whoami) chroot
+ debootstrap ${DEBOOTSTRAP_OPTIONS} "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}"
fi
# Deconfiguring debootstrap configurations
diff --git a/scripts/build/chroot_cache b/scripts/build/chroot_cache
index 16ff49260..98d5a6de3 100755
--- a/scripts/build/chroot_cache
+++ b/scripts/build/chroot_cache
@@ -47,12 +47,7 @@ do
rm -rf chroot
# Restoring old cache
- ${LB_ROOT_COMMAND} cp -a cache/chroot chroot
-
- if [ -n "${LB_ROOT_COMMAND}" ]
- then
- ${LB_ROOT_COMMAND} chown -R $(whoami):$(whoami) chroot
- fi
+ cp -a cache/chroot chroot
# Creating stage file
Create_stagefile .build/chroot_cache.restore
@@ -77,12 +72,7 @@ do
mkdir -p cache
- ${LB_ROOT_COMMAND} cp -a chroot cache/chroot
-
- if [ -n "${LB_ROOT_COMMAND}" ]
- then
- ${LB_ROOT_COMMAND} chown -R $(whoami):$(whoami) cache/chroot
- fi
+ cp -a chroot cache/chroot
# Creating stage file
Create_stagefile .build/chroot_cache.save
diff --git a/scripts/build/chroot_devpts b/scripts/build/chroot_devpts
index 2f8aa4b63..6b1a348a0 100755
--- a/scripts/build/chroot_devpts
+++ b/scripts/build/chroot_devpts
@@ -49,7 +49,7 @@ case "${1}" in
mkdir -p chroot/dev/pts
# Mounting /dev/pts
- ${LB_ROOT_COMMAND} mount devpts-live -t devpts chroot/dev/pts || true
+ mount devpts-live -t devpts chroot/dev/pts || true
fi
# Creating stage file
@@ -70,9 +70,9 @@ case "${1}" in
then
if grep -qs "$(pwd)/chroot/dev/pts" /proc/mounts || Find_files chroot/dev/pts/*
then
- ${LB_ROOT_COMMAND} umount chroot/dev/pts
+ umount chroot/dev/pts
else
- ${LB_ROOT_COMMAND} umount -f chroot/dev/pts > /dev/null 2>&1 || true
+ umount -f chroot/dev/pts > /dev/null 2>&1 || true
fi
fi
diff --git a/scripts/build/chroot_dpkg b/scripts/build/chroot_dpkg
index b9fa840e0..c67d8eb96 100755
--- a/scripts/build/chroot_dpkg
+++ b/scripts/build/chroot_dpkg
@@ -64,10 +64,10 @@ EOF
# samhain
if [ -e /var/state/samhain/samhain_file ]
then
- ${LB_ROOT_COMMAND} mv /var/state/samhain/samhain_file /var/state/samhain/samhain_file.orig
+ mv /var/state/samhain/samhain_file /var/state/samhain/samhain_file.orig
else
- ${LB_ROOT_COMMAND} mkdir -p /var/state/samhain
- ${LB_ROOT_COMMAND} touch /var/state/samhain/samhain_file
+ mkdir -p /var/state/samhain
+ touch /var/state/samhain/samhain_file
fi
# flash-kernel
@@ -96,11 +96,11 @@ EOF
# samhain
if [ -e /var/state/samhain/samhain_file.orig ]
then
- ${LB_ROOT_COMMAND} mv /var/state/samhain/samhain_file.orig /var/state/samhain/samhain_file
+ mv /var/state/samhain/samhain_file.orig /var/state/samhain/samhain_file
elif [ -d /var/state/samhain ]
then
- ${LB_ROOT_COMMAND} rm -f /var/state/samhain/samhain_file
- ${LB_ROOT_COMMAND} rmdir --ignore-fail-on-non-empty /var/state/samhain || true
+ rm -f /var/state/samhain/samhain_file
+ rmdir --ignore-fail-on-non-empty /var/state/samhain || true
fi
# Restore start-stop-daemon program
diff --git a/scripts/build/chroot_hacks b/scripts/build/chroot_hacks
index e419576a5..bbf02f930 100755
--- a/scripts/build/chroot_hacks
+++ b/scripts/build/chroot_hacks
@@ -104,11 +104,6 @@ case "${LB_INITRAMFS_COMPRESSION}" in
;;
esac
-if [ -n "${LB_ROOT_COMMAND}" ]
-then
- ${LB_ROOT_COMMAND} chown -R --quiet $(whoami):$(whoami) chroot
-fi
-
case "${LB_INITRAMFS}" in
casper)
ID="999"
diff --git a/scripts/build/chroot_proc b/scripts/build/chroot_proc
index 96437e563..99dd81178 100755
--- a/scripts/build/chroot_proc
+++ b/scripts/build/chroot_proc
@@ -49,7 +49,7 @@ case "${1}" in
mkdir -p chroot/proc
# Mounting /proc
- ${LB_ROOT_COMMAND} mount proc-live -t proc chroot/proc
+ mount proc-live -t proc chroot/proc
else
rm -rf chroot/proc
ln -s /proc chroot/
@@ -73,14 +73,14 @@ case "${1}" in
# Workaround binfmt-support /proc locking
if [ -e chroot/proc/sys/fs/binfmt_misc/status ]
then
- ${LB_ROOT_COMMAND} umount chroot/proc/sys/fs/binfmt_misc
+ umount chroot/proc/sys/fs/binfmt_misc
fi
# Unmounting /proc
#fuser -km chroot/proc
if [ -e chroot/proc/version ]
then
- ${LB_ROOT_COMMAND} umount chroot/proc
+ umount chroot/proc
fi
else
rm -rf chroot/proc
diff --git a/scripts/build/chroot_selinuxfs b/scripts/build/chroot_selinuxfs
index 223d1accf..23c2ae4e5 100755
--- a/scripts/build/chroot_selinuxfs
+++ b/scripts/build/chroot_selinuxfs
@@ -51,7 +51,7 @@ case "${1}" in
mkdir -p chroot/selinux
# Mounting /selinux
- ${LB_ROOT_COMMAND} mount selinuxfs-live -t selinuxfs chroot/selinux
+ mount selinuxfs-live -t selinuxfs chroot/selinux
else
rm -rf chroot/selinux
ln -s /selinux chroot/
@@ -77,7 +77,7 @@ case "${1}" in
#fuser -km chroot/selinux
if [ -e chroot/selinux/enforce ]
then
- ${LB_ROOT_COMMAND} umount chroot/selinux
+ umount chroot/selinux
fi
else
if [ -e chroot/selinux ]
diff --git a/scripts/build/chroot_sysfs b/scripts/build/chroot_sysfs
index 9ae890942..a40078f30 100755
--- a/scripts/build/chroot_sysfs
+++ b/scripts/build/chroot_sysfs
@@ -49,7 +49,7 @@ case "${1}" in
mkdir -p chroot/sys
# Mounting /sys
- ${LB_ROOT_COMMAND} mount sysfs-live -t sysfs chroot/sys
+ mount sysfs-live -t sysfs chroot/sys
else
rm -rf chroot/sys
ln -s /sys chroot/
@@ -74,7 +74,7 @@ case "${1}" in
#fuser -km chroot/sys
if [ -e chroot/sys/class ]
then
- ${LB_ROOT_COMMAND} umount chroot/sys
+ umount chroot/sys
fi
else
rm -rf chroot/sys
diff --git a/scripts/build/clean b/scripts/build/clean
index 3c0f35f75..8706bf214 100755
--- a/scripts/build/clean
+++ b/scripts/build/clean
@@ -68,26 +68,26 @@ do
;;
--cache)
- ${LB_ROOT_COMMAND} rm -rf cache
+ rm -rf cache
;;
--chroot)
Echo_message "Cleaning chroot"
- ${LB_ROOT_COMMAND} umount -f chroot/run > /dev/null 2>&1 || true
- ${LB_ROOT_COMMAND} umount -f chroot/sys > /dev/null 2>&1 || true
- ${LB_ROOT_COMMAND} umount -f chroot/proc/sys/fs/binfmt_misc > /dev/null 2>&1 || true
- ${LB_ROOT_COMMAND} umount -f chroot/proc > /dev/null 2>&1 || true
- ${LB_ROOT_COMMAND} umount -f chroot/lib/init/rw > /dev/null 2>&1 || true
- ${LB_ROOT_COMMAND} umount -f chroot/dev/shm > /dev/null 2>&1 || true
- ${LB_ROOT_COMMAND} umount -f chroot/dev/pts > /dev/null 2>&1 || true
- ${LB_ROOT_COMMAND} umount -f chroot/dev > /dev/null 2>&1 || true
- ${LB_ROOT_COMMAND} umount -f chroot/var/lib/dpkg > /dev/null 2>&1 || true
- ${LB_ROOT_COMMAND} umount -f chroot/root/config > /dev/null 2>&1 || true
-
- ${LB_ROOT_COMMAND} umount -f chroot/binary.tmp > /dev/null 2>&1 || true
- ${LB_ROOT_COMMAND} umount -f chroot/dev.tmp/pts > /dev/null 2>&1 || true
-
- ${LB_ROOT_COMMAND} rm -rf chroot chroot.tmp
+ umount -f chroot/run > /dev/null 2>&1 || true
+ umount -f chroot/sys > /dev/null 2>&1 || true
+ umount -f chroot/proc/sys/fs/binfmt_misc > /dev/null 2>&1 || true
+ umount -f chroot/proc > /dev/null 2>&1 || true
+ umount -f chroot/lib/init/rw > /dev/null 2>&1 || true
+ umount -f chroot/dev/shm > /dev/null 2>&1 || true
+ umount -f chroot/dev/pts > /dev/null 2>&1 || true
+ umount -f chroot/dev > /dev/null 2>&1 || true
+ umount -f chroot/var/lib/dpkg > /dev/null 2>&1 || true
+ umount -f chroot/root/config > /dev/null 2>&1 || true
+
+ umount -f chroot/binary.tmp > /dev/null 2>&1 || true
+ umount -f chroot/dev.tmp/pts > /dev/null 2>&1 || true
+
+ rm -rf chroot chroot.tmp
rm -f chroot.packages.live chroot.packages.install
@@ -95,7 +95,7 @@ do
;;
--binary)
- ${LB_ROOT_COMMAND} umount -f binary.tmp > /dev/null 2>&1 || true
+ umount -f binary.tmp > /dev/null 2>&1 || true
rm -rf binary.tmp binary.deb binary.udeb
rm -f ${LIVE_IMAGE_NAME}*.iso
rm -f ${LIVE_IMAGE_NAME}*.img
diff --git a/scripts/build/config b/scripts/build/config
index cb2ed9eeb..75c7b127a 100755
--- a/scripts/build/config
+++ b/scripts/build/config
@@ -113,7 +113,6 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
\t [--net-cow-server IP|HOSTNAME]\n\
\t [--net-tarball true|false]\n\
\t [--quiet]\n\
-\t [--root-command sudo]\n\
\t [--use-fakeroot true|false]\n\
\t [--archives ARCHIVE|\"ARCHIVES\"]\n\
\t [--archive-areas ARCHIVE_AREA|\"ARCHIVE_AREAS\"]\n\
@@ -143,7 +142,7 @@ Local_arguments ()
LONG_OPTIONS="apt:,apt-ftp-proxy:,apt-http-proxy:,apt-options:,aptitude-options:,debootstrap-options:,cdebootstrap-options:,
apt-pipeline:,apt-recommends:,apt-secure:,apt-source-archives:,bootstrap:,cache:,cache-indices:,cache-packages:,
cache-stages:,debconf-frontend:,debconf-priority:,dump,
- initramfs:,initramfs-compression:,initsystem:,fdisk:,losetup:,mode:,system:,root-command:,use-fakeroot:,tasksel:,
+ initramfs:,initramfs-compression:,initsystem:,fdisk:,losetup:,mode:,system:,use-fakeroot:,tasksel:,
templates:,architectures:,clean,
distribution:,parent-distribution:,parent-debian-installer-distribution:,parent-mirror-bootstrap:,parent-mirror-chroot:,parent-mirror-chroot-security:,parent-mirror-chroot-updates:,parent-mirror-chroot-backports:,parent-mirror-binary:,
parent-mirror-binary-security:,parent-mirror-binary-updates:,parent-mirror-binary-backports:,parent-mirror-debian-installer:,
@@ -348,11 +347,6 @@ Local_arguments ()
shift 2
;;
- --root-command)
- LB_ROOT_COMMAND="${2}"
- shift 2
- ;;
-
--use-fakeroot)
LB_USE_FAKEROOT="${2}"
shift 2
@@ -1053,10 +1047,6 @@ LB_MODE="${LB_MODE}"
# (Default: ${LB_SYSTEM})
LB_SYSTEM="${LB_SYSTEM}"
-# \$LB_ROOT_COMMAND: use sudo or equivalent
-# (Default: empty)
-#LB_ROOT_COMMAND="sudo"
-
# \$LB_USE_FAKEROOT: use fakeroot/fakechroot
# (Default: ${LB_USE_FAKEROOT})
LB_USE_FAKEROOT="${LB_USE_FAKEROOT}"
diff --git a/scripts/build/source_hdd b/scripts/build/source_hdd
index b622a6817..1b5ee9121 100755
--- a/scripts/build/source_hdd
+++ b/scripts/build/source_hdd
@@ -126,9 +126,9 @@ esac
Chroot chroot "mkfs.${MKFS} ${MKFS_OPTIONS} ${FREELO}"
mkdir -p source.tmp
-${LB_ROOT_COMMAND} mount ${FREELO} source.tmp
+mount ${FREELO} source.tmp
cp -r source/* source.tmp
-${LB_ROOT_COMMAND} umount source.tmp
+umount source.tmp
rmdir source.tmp
Lodetach ${FREELO}
Echo_warning "!!! The above error/warning messages can be ignored !!!"
diff --git a/scripts/build/testroot b/scripts/build/testroot
index 9c63b79b4..9b4f86c26 100755
--- a/scripts/build/testroot
+++ b/scripts/build/testroot
@@ -25,7 +25,7 @@ Read_conffiles config/all config/common config/bootstrap config/chroot config/bi
Set_defaults
# Checking user account
-if [ "$(${LB_ROOT_COMMAND} id -u)" -ne "0" ]
+if [ "$(id -u)" -ne "0" ]
then
Echo_error "need root privileges"
exit 1