[gnome-hwtest] Improve identification of a controller system
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-hwtest] Improve identification of a controller system
- Date: Fri, 26 Sep 2014 17:40:00 +0000 (UTC)
commit 2537e6e5f574f33f8a905fcc80b94c1f8452d15e
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Sun Sep 21 11:59:36 2014 -0400
Improve identification of a controller system
Instead of looking for whether a srv-gnome-hwtest partition exists
(which prevents booting a controller system from USB to reinstall
it), look at the label of the root device.
This will prevent running the hwtest image as a controller by adding
a srv-gnome-hwtest partition, but we no longer need this mode of
operation.
src/gnome-hwtest-start | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/src/gnome-hwtest-start b/src/gnome-hwtest-start
index 835fc6e..e13dac5 100755
--- a/src/gnome-hwtest-start
+++ b/src/gnome-hwtest-start
@@ -27,14 +27,14 @@ hwtest_device_label() {
mkdir -p /run/gnome-hwtest
+rootdev=`hwtest_find_rootdev`
+rootdev_label=`hwtest_device_label $rootdev`
+
# See if we were booted from iSCSI
modprobe iscsi_ibft
if [ -e /sys/firmware/ibft/target0/ip-addr ] ; then
controller_ip=`cat /sys/firmware/ibft/target0/ip-addr`
- rootdev=`hwtest_find_rootdev`
- rootdev_label=`hwtest_device_label $rootdev`
-
if [ "$rootdev_label" = hwt-updater-r -o "$rootdev_label" = gnostree-root ] ; then
mode=updater
else
@@ -44,13 +44,15 @@ if [ -e /sys/firmware/ibft/target0/ip-addr ] ; then
# Get parameters from the source machine
curl http://$controller_ip/params > /run/gnome-hwtest/params
else
- if [ -e /dev/disk/by-label/srv-gnome-hwtest ] ; then
- # /srv may be read-only
- mount -t tmpfs none /srv/
- mkdir -p /srv/gnome-hwtest
- mount /dev/disk/by-label/srv-gnome-hwtest /srv/gnome-hwtest
- mkdir -p /srv/gnome-hwtest/roothome
- mount --bind /srv/gnome-hwtest/roothome /var/roothome
+ if [ "$rootdev_label" = hwt-controller-r ] ; then
+ if [ -e /dev/disk/by-label/srv-gnome-hwtest ] ; then
+ # /srv may be read-only
+ mount -t tmpfs none /srv/
+ mkdir -p /srv/gnome-hwtest
+ mount /dev/disk/by-label/srv-gnome-hwtest /srv/gnome-hwtest
+ mkdir -p /srv/gnome-hwtest/roothome
+ mount --bind /srv/gnome-hwtest/roothome /var/roothome
+ fi
for f in /sys/bus/virtio/drivers/9pnet_virtio/virtio*/mount_tag ; do
if [ -e $f ] ; then
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]