From 13eab5f8fe50fca373bf2a13f2afff327aef8e94 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 15 Oct 2013 18:25:46 +0200 Subject: [PATCH] add phablet-install --- phablet-install | 37 +++++++++++++++++++++++++++++++++++++ postinst-setup | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100755 phablet-install diff --git a/phablet-install b/phablet-install new file mode 100755 index 0000000..3cfccda --- /dev/null +++ b/phablet-install @@ -0,0 +1,37 @@ +#!/bin/sh +set -e + +CHANNEL=devel-proposed +MYNAME=$(getent passwd `whoami` | cut -f5 -d: | cut -f1 -d,) +MYMAIL=${DEBMEMAIL:-$EMAIL} + +# flash the latest image +phablet-flash ubuntu-system --no-backup --channel $CHANNEL + +# make image writable +adb shell "touch /userdata/.writable_image" +# configure timezone +adb shell "timedatectl set-timezone `cat /etc/timezone`" + +echo "rebooting to activate writable image..." +adb reboot +adb wait-for-device + +# install some necessary packages +echo "connect to wifi now and press Enter" +read n +adb shell "apt-get install -y vim bzr ubuntu-ui-toolkit-autopilot ofono-phonesim" + +# set up bzr, vim, ssh +adb shell "su -c 'mkdir ~/.ssh' phablet" +adb push ~/.ssh/id_rsa.pub /home/phablet/.ssh/authorized_keys +adb shell "chmod 600 /home/phablet/.ssh/authorized_keys" +if [ -e ~/.vimrc ]; then + adb push ~/.vimrc /home/phablet/.vimrc + adb shell "echo 'set bg=light' >> /home/phablet/.vimrc" +fi +adb shell "chown -R phablet:phablet /home/phablet" + +# start ssh +adb shell "start ssh" +adb forward tcp:22000 tcp:22 diff --git a/postinst-setup b/postinst-setup index 2d44ad9..5b26de5 100755 --- a/postinst-setup +++ b/postinst-setup @@ -43,7 +43,7 @@ apt-get purge -y --auto-remove hplip hplip-data printer-driver-hpcups brltty blu killall apt-get || true apt-get update -DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y --force-yes vim patchutils offlineimap diffstat gtimelog libtool devhelp python3-doc manpages-dev weechat weechat-plugins weechat-scripts wdiff ccache listadmin quilt mutt editmoin lintian ubuntu-dev-tools dput easytag rsnapshot texlive-lang-german texlive-latex-extra powertop qemu-kvm qemu-utils bzr-buildpackage git build-essential fakeroot devscripts libglib2.0-doc libgtk-3-doc git-buildpackage d-feet debootstrap wmctrl mumble libnotify-bin svn-buildpackage pastebinit lptools openvpn pdfjam sbuild schroot exiv2 android-tools-adb phablet-tools gstreamer1.0-plugins-ugly flashplugin-installer valgrind +DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y --force-yes vim patchutils offlineimap diffstat gtimelog libtool devhelp python3-doc manpages-dev weechat weechat-plugins weechat-scripts wdiff ccache listadmin quilt mutt editmoin lintian ubuntu-dev-tools dput easytag rsnapshot texlive-lang-german texlive-latex-extra powertop qemu-kvm qemu-utils bzr-buildpackage git build-essential fakeroot devscripts libglib2.0-doc libgtk-3-doc git-buildpackage d-feet debootstrap wmctrl mumble libnotify-bin svn-buildpackage pastebinit lptools openvpn pdfjam sbuild schroot exiv2 android-tools-adb phablet-tools gstreamer1.0-plugins-ugly flashplugin-installer valgrind calibre apt-get -y --no-install-recommends build-dep postgresql-9.1 apport calibre gvfs udisks2 upower gnome-disk-utility systemd pygobject umockdev -- 2.39.2