[gnome-hwtest] gnome-hwtest-install: do basic setup of /srv/gnome-hwtest
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-hwtest] gnome-hwtest-install: do basic setup of /srv/gnome-hwtest
- Date: Fri, 26 Sep 2014 17:40:05 +0000 (UTC)
commit 42e6963152c669426eeb07a45d76e98f00ad8522
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Sun Sep 21 12:13:27 2014 -0400
gnome-hwtest-install: do basic setup of /srv/gnome-hwtest
Create the directory, initialize the repo, and create a stub
controller.conf.
src/gnome-hwtest-install | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
---
diff --git a/src/gnome-hwtest-install b/src/gnome-hwtest-install
index f9b17ee..2561df3 100755
--- a/src/gnome-hwtest-install
+++ b/src/gnome-hwtest-install
@@ -208,6 +208,38 @@ function install_to_device() {
sed "s/^LABEL=gnostree-boot/LABEL=hwt-$identifier-b/; s/^LABEL=gnostree-root/LABEL=hwt-$identifier-r/;
s/^LABEL=gnostree-swap/#LABEL=gnostree-swap/;" \
< $fstab > $fstab.new && mv $fstab.new $fstab
+ if [ $identifier = controller ] ; then
+ echo 1>&2 "Setting up /srv/gnome-hwtest"
+ hwtestdir=/tmp/installroot/ostree/deploy/gnome-continuous/var/srv/gnome-hwtest
+ mkdir -p $hwtestdir
+
+ if [ -e /dev/disk/by-label/srv-gnome-hwtest ] ; then
+ mount /dev/disk/by-label/srv-gnome-hwtest $hwtestdir
+ fi
+
+ if [ -d $hwtestdir/repo ] ; then
+ echo "/srv/gnome-hwtest/repo already exists"
+ else
+ repo=$hwtestdir/repo
+ ostree --repo=$repo init --mode=archive-z2
+ ostree --repo=$repo remote add gnome-continuous https://build.gnome.org/repo
+ fi
+
+ if [ -e $hwtestdir/controller.conf ] ; then
+ echo "/srv/gnome-hwtest/controller.conf already exists"
+ else
+ cat > $hwtestdir/controller.conf <<EOF
+[controller]
+# private_hwaddr=FILL_ME_IN
+# public_hwaddr=FILL_ME_IN
+EOF
+ fi
+
+ if [ -e /dev/disk/by-label/srv-gnome-hwtest ] ; then
+ unmount $hwtestdir
+ fi
+ fi
+
umount /tmp/installroot/boot
umount /tmp/installroot
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]