From a4af6b8df2e6c8a3f3d0740a887d994a1739ffe4 Mon Sep 17 00:00:00 2001 From: Manfred Touron Date: Tue, 28 Oct 2014 17:42:19 +0000 Subject: [PATCH] Added |, &&, ; and || support in do_in_target --- images/archlinux-latest/build | 8 ++++---- images/lib.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/images/archlinux-latest/build b/images/archlinux-latest/build index a6efde5..c26ef08 100755 --- a/images/archlinux-latest/build +++ b/images/archlinux-latest/build @@ -27,7 +27,7 @@ patch_image() { sudo mount -t sysfs sys $TARGET/sys sudo mount -o bind /dev $TARGET/dev sudo rm -f $TARGET/etc/mtab - do_in_target grep -v rootfs /proc/mounts | sudo tee -a $TARGET/etc/mtab + do_in_target "grep -v rootfs /proc/mounts | sudo tee -a $TARGET/etc/mtab" sudo mkdir -p $TARGET/run/systemd/resolve sudo cp /etc/resolv.conf $TARGET/run/systemd/resolve/resolv.conf @@ -35,11 +35,11 @@ patch_image() { # FIXME: patch_target archlinux-latest/patches # FIXME: locales - # - do_in_target locale-gen en_US.UTF-8 + # - do_in_target "locale-gen en_US.UTF-8" # ssh server - do_in_target pacman -S --noconfirm openssh - do_in_target systemctl enable sshd.service + do_in_target "pacman -S --noconfirm openssh" + do_in_target "systemctl enable sshd.service" # clean chroot sudo rm -f $TARGET/etc/mtab $TARGET/run/systemd/resolve/resolv.conf diff --git a/images/lib.sh b/images/lib.sh index e12dc96..2967feb 100644 --- a/images/lib.sh +++ b/images/lib.sh @@ -76,7 +76,7 @@ archive_target() { } do_in_target() { - sudo chroot "$TARGET" $@ + sudo chroot "$TARGET" su - root -c "$@" } push_to_s3() {