replace "sudo -E" calls
This commit is contained in:
parent
fb212c12d0
commit
b90aaecfb0
|
|
@ -51,7 +51,7 @@ bootstrap_complete_base() {
|
||||||
|
|
||||||
notice "running debootstrap stage 1"
|
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" \
|
--keyring="$LIBPATH/extra/devuan-keyring/keyrings/devuan-archive-keyring.gpg" \
|
||||||
--foreign \
|
--foreign \
|
||||||
--arch $arch $release $strapdir $mirror || zerr
|
--arch $arch $release $strapdir $mirror || zerr
|
||||||
|
|
@ -63,7 +63,7 @@ bootstrap_complete_base() {
|
||||||
|
|
||||||
## debootstrap stage 2
|
## debootstrap stage 2
|
||||||
notice "running debootstrap stage 2"
|
notice "running debootstrap stage 2"
|
||||||
sudo -E chroot $strapdir \
|
sudo chroot $strapdir \
|
||||||
/debootstrap/debootstrap --second-stage || zerr
|
/debootstrap/debootstrap --second-stage || zerr
|
||||||
|
|
||||||
## write all system configuration
|
## write all system configuration
|
||||||
|
|
|
||||||
|
|
@ -292,11 +292,11 @@ chroot-script() {
|
||||||
|
|
||||||
## logging
|
## logging
|
||||||
sudo sed -i "$strapdir/$script" \
|
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..."
|
notice "chrooting to execute $script..."
|
||||||
sudo chmod +x "$strapdir/$script" || zerr
|
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/"
|
sudo mv -f "$strapdir/${script}.log" "$R/log/"
|
||||||
|
|
||||||
[[ "$APT_CACHE" = 1 ]] && { aptcache off "$strapdir/mnt" || zerr }
|
[[ "$APT_CACHE" = 1 ]] && { aptcache off "$strapdir/mnt" || zerr }
|
||||||
|
|
@ -313,7 +313,7 @@ chroot-script() {
|
||||||
|
|
||||||
notice "chrooting to execute $script..."
|
notice "chrooting to execute $script..."
|
||||||
sudo chmod +x "$strapdir/$script" || zerr
|
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/"
|
sudo mv -f "$strapdir/${script}.log" "$R/log/"
|
||||||
|
|
||||||
[[ "$APT_CACHE" = 1 ]] && { aptcache off "$strapdir/mnt" || zerr }
|
[[ "$APT_CACHE" = 1 ]] && { aptcache off "$strapdir/mnt" || zerr }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue