replace "sudo -E" calls

This commit is contained in:
parazyd 2017-11-13 17:45:54 +01:00
parent fb212c12d0
commit b90aaecfb0
No known key found for this signature in database
GPG Key ID: F0CB28FCF78637DE
2 changed files with 5 additions and 5 deletions

View File

@ -51,7 +51,7 @@ bootstrap_complete_base() {
notice "running debootstrap stage 1"
sudo -E env DEBOOTSTRAP_DIR="$LIBPATH/extra/debootstrap" "$LIBPATH/extra/debootstrap/debootstrap" \
sudo DEBOOTSTRAP_DIR="$LIBPATH/extra/debootstrap" "$LIBPATH/extra/debootstrap/debootstrap" \
--keyring="$LIBPATH/extra/devuan-keyring/keyrings/devuan-archive-keyring.gpg" \
--foreign \
--arch $arch $release $strapdir $mirror || zerr
@ -63,7 +63,7 @@ bootstrap_complete_base() {
## debootstrap stage 2
notice "running debootstrap stage 2"
sudo -E chroot $strapdir \
sudo chroot $strapdir \
/debootstrap/debootstrap --second-stage || zerr
## write all system configuration

View File

@ -292,11 +292,11 @@ chroot-script() {
## logging
sudo sed -i "$strapdir/$script" \
-e 's@#!/bin/sh@#!/bin/sh\'$'\nset -x ; exec 2>/'$script'.log@'
-e 's@#!/bin/sh@#!/bin/sh\'$'\nset -x ; exec 2>/'$script'.log ; export DEBIAN_FRONTEND=noninteractive@'
notice "chrooting to execute $script..."
sudo chmod +x "$strapdir/$script" || zerr
sudo -E chroot "$strapdir" "/$script" || zerr
sudo chroot "$strapdir" "/$script" || zerr
sudo mv -f "$strapdir/${script}.log" "$R/log/"
[[ "$APT_CACHE" = 1 ]] && { aptcache off "$strapdir/mnt" || zerr }
@ -313,7 +313,7 @@ chroot-script() {
notice "chrooting to execute $script..."
sudo chmod +x "$strapdir/$script" || zerr
sudo -E chroot "$strapdir" "/$script" || zerr
sudo chroot "$strapdir" "/$script" || zerr
sudo mv -f "$strapdir/${script}.log" "$R/log/"
[[ "$APT_CACHE" = 1 ]] && { aptcache off "$strapdir/mnt" || zerr }