summaryrefslogtreecommitdiff
path: root/src/chroot-tools/librechroot
diff options
context:
space:
mode:
Diffstat (limited to 'src/chroot-tools/librechroot')
-rwxr-xr-xsrc/chroot-tools/librechroot22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot
index 051148d..f449f0d 100755
--- a/src/chroot-tools/librechroot
+++ b/src/chroot-tools/librechroot
@@ -186,23 +186,7 @@ arch_nspawn_flags=()
sysd_nspawn_flags=()
arch-nspawn() {
local copydir=$1; shift
- # XXX: SYSTEMD-STDOUT HACK
- if [[ -t 1 ]]; then
- cmd=("$@")
- else
- # This perl script is similar to `sed 's|\n|\r\n|g'`, (or, more
- # correctly, `sed 's|$|\r|'`) but it does't line-buffer.
- local perlcmd='
-my $size;
-my $buffer;
-while(1) {
- $size=sysread(STDIN, $buffer, 40);
- last if ($size < 1);
- $buffer =~ s/\n/\r\n/g;
- syswrite(STDOUT, $buffer);
-}'
- cmd=(bash --noprofile --norc -c "set -o pipefail; $(printf '%q ' "$@") |& perl -e $(printf '%q' "$perlcmd")")
- fi
+ local cmd=("$@")
set +u # if an array is empty, it counts as unbound
"$_arch_nspawn" "${arch_nspawn_flags[@]}" "$copydir" "${sysd_nspawn_flags[@]}" -- "${cmd[@]}"
@@ -381,9 +365,7 @@ main() {
arch-nspawn "$copydir" pacman -Sy "$@"
;;
update)
- # umount resolv.conf so that it can be upgraded, if nescessary
- # this disables DNS, so fetch everything first
- arch-nspawn "$copydir" bash -c 'pacman -Syuw --noconfirm && umount /etc/resolv.conf && pacman -Su --noconfirm'
+ arch-nspawn "$copydir" bash -c 'pacman -Syu --noconfirm'
;;
clean-pkgs)
trap "rm -f '$copydir'/bin/chcleanup '$copydir'/chrootexec" EXIT