From: Martin Pitt Date: Mon, 7 Aug 2017 15:16:54 +0000 (+0200) Subject: vmdebdev: fix apt-get aborting expect, add more packages X-Git-Url: https://piware.de/gitweb/?a=commitdiff_plain;h=85cfb84505bf498b1c970dd4fc8df3105f941299;p=bin.git vmdebdev: fix apt-get aborting expect, add more packages --- diff --git a/vmdebdev b/vmdebdev index c50c463..33efdf7 100755 --- a/vmdebdev +++ b/vmdebdev @@ -31,28 +31,28 @@ expect { send "export TERM=xterm; $getroot\r" expect -re $prompt -# install wanted packages -send "apt-get install -o Dpkg::Options::=--force-confnew -y sudo less bash-completion vim openssh-server locales git-buildpackage build-essential fakeroot lintian debhelper manpages-dev git dput pristine-tar schroot sbuild &1 | cat\r" expect -re $prompt # set up user send "deluser --remove-home test; adduser --disabled-password --gecos 'Martin Pitt' martin; echo 'martin:a' | chpasswd; adduser martin sbuild\r" expect -re $prompt -send "echo 'martin ALL=(ALL) NOPASSWD:ALL' | tee /etc/sudoers.d/martin; update-locale LANG=C.UTF-8; touch /var/lib/sudo/lectured/martin\r" +send "echo 'martin ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/martin; update-locale LANG=C.UTF-8; touch /var/lib/sudo/lectured/martin\r" expect -re $prompt -send "mkdir /home/martin/.ssh; echo '$sshkey' | tee /home/martin/.ssh/authorized_keys; chown -R martin:martin /home/martin/.ssh\r" +send "mkdir /home/martin/.ssh; echo '$sshkey' > /home/martin/.ssh/authorized_keys; chown -R martin:martin /home/martin/.ssh\r" expect -re $prompt # mount home, /srv, and schroot config from host; TODO: move to NFS? -send "mkdir /home/martin/h; printf 'home /home/martin/h 9p trans=virtio,access=any,nofail,ro 0 0\nsrv /srv 9p trans=virtio,access=any,nofail,ro 0 0\netcschroot /etc/schroot 9p trans=virtio,access=any,nofail,ro 0 0\n' | tee -a /etc/fstab; mount /home/martin/h; mount /srv; mount /etc/schroot\r" +send "mkdir /home/martin/h; printf 'home /home/martin/h 9p trans=virtio,access=any,nofail,ro 0 0\nsrv /srv 9p trans=virtio,access=any,nofail,ro 0 0\netcschroot /etc/schroot 9p trans=virtio,access=any,nofail,ro 0 0\n' >> /etc/fstab; mount /home/martin/h; mount /srv; mount /etc/schroot\r" expect -re $prompt send "(cd /home/martin; ln -s h/.gbp.conf; ln -s h/.vimrc)\r" +expect -re $prompt -# set up lxd if available (on Ubuntu) -# FIXME: lxd init invocation aborts expect/qemu -#send "apt-get install -y lxd &1 | cat\r" expect -re $prompt interact