summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-03-06 12:16:33 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-03-06 12:16:33 -0500
commit8cbd5fc2e616785d97e84f7e17b845b74a6ccfd1 (patch)
tree4f3f2b45aa11e0facaf7873105226bfcf32c9dd8
parent5656c9706cf6f96e0646e9594750d8239e5fcbea (diff)
Update for the new version of systemdv20140306
-rwxr-xr-xsrc/chroot-tools/indent4
-rwxr-xr-xsrc/chroot-tools/librechroot22
2 files changed, 3 insertions, 23 deletions
diff --git a/src/chroot-tools/indent b/src/chroot-tools/indent
index 0e2d0e0..5a7f654 100755
--- a/src/chroot-tools/indent
+++ b/src/chroot-tools/indent
@@ -19,9 +19,7 @@ while (1) {
$c = substr($buffer, $_, 1);
if ($c eq "\n") {
syswrite(STDOUT, $indent) if ($print_indent);
- # XXX: SYSTEMD-STDOUT HACK
- #syswrite(STDOUT, $c, 1);
- syswrite(STDOUT, "\r\n", 2);
+ syswrite(STDOUT, $c, 1);
$print_indent = 1;
} elsif ($c eq "\r") {
syswrite(STDOUT, $c, 1);
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