Merge branch 'master' of ssh://git.onelab.eu/git/bootmanager
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 17 Jan 2011 21:28:02 +0000 (22:28 +0100)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 17 Jan 2011 21:28:02 +0000 (22:28 +0100)
Makefile
source/BootManager.py
source/steps/MakeInitrd.py

index 2d4054d..df16ab0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,11 +7,11 @@
 # (*) otherwise, entering through the root context
 # make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr
 
+PLCHOST ?= testplc.onelab.eu
+
 ifdef GUEST
-ifdef PLCHOST
 SSHURL:=root@$(PLCHOST):/vservers/$(GUEST)
-SSHCOMMAND:=ssh root@$(PLCHOST) vserver $(GUEST)
-endif
+SSHCOMMAND:=ssh root@$(PLCHOST) vserver $(GUEST) exec
 endif
 ifdef PLC
 SSHURL:=root@$(PLC):/
@@ -19,7 +19,7 @@ SSHCOMMAND:=ssh root@$(PLC)
 endif
 
 LOCAL_RSYNC_EXCLUDES   := --exclude '*.pyc' 
-RSYNC_EXCLUDES         := --exclude .svn --exclude CVS --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
+RSYNC_EXCLUDES         := --exclude .svn --exclude .git --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
 RSYNC_COND_DRY_RUN     := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
 RSYNC                  := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
 
@@ -28,9 +28,8 @@ DEPLOYMENT ?= regular
 sync:
 ifeq (,$(SSHURL))
        @echo "sync: You must define, either PLC, or PLCHOST & GUEST, on the command line"
-       @echo " you can optionnally define DEPLOYMENT too, it defaults to 'regular'"
-       @echo "  e.g. make sync PLC=boot.onelab.eu DEPLOYMENT=alpha"
-       @echo "  or   make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr"
+       @echo "  e.g. make sync PLC=boot.planetlab.eu"
+       @echo "  or   make sync PLCHOST=testplc.onelab.eu GUEST=vplc03.inria.fr"
        @exit 1
 else
        $(SSHCOMMAND) mkdir -p /usr/share/bootmanager/$(DEPLOYMENT)
@@ -40,6 +39,6 @@ endif
 
 ##########
 tags:
-       find . -type f | egrep -v '/\.svn/|\.git/|~$$' | xargs etags
+       find . -type f | egrep -v 'TAGS|/\.svn/|\.git/|~$$' | xargs etags
 
 .PHONY: tags
index eae4c04..f47748d 100755 (executable)
@@ -356,7 +356,7 @@ def main(argv):
     import utils
     utils.prompt_for_breakpoint_mode()
 
-    utils.breakpoint ("Entering BootManager::main")
+#    utils.breakpoint ("Entering BootManager::main")
     
     # set to 1 if error occurred
     error= 0
index b70271d..808dac1 100644 (file)
@@ -52,8 +52,11 @@ def Run( vars, log ):
 
     # mkinitrd needs /dev and /proc to do the right thing.
     # /proc is already mounted, so bind-mount /dev here
-    # looks like this dir somehow already exists under f14
-    utils.sysexec_noerr("mount -o bind /dev %s/dev" % SYSIMG_PATH)
+    # xxx tmp - trying to work around the f14 case:
+    # check that /dev/ is mounted with devtmpfs
+    if utils.sysexec_noerr ("grep devtmpfs /proc/mounts") != 0:
+        utils.sysexec("mount -t devtmpfs none /dev")
+    utils.sysexec("mount -o bind /dev %s/dev" % SYSIMG_PATH)
     utils.sysexec("mount -t sysfs none %s/sys" % SYSIMG_PATH)
 
     initrd, kernel_version= systeminfo.getKernelVersion(vars,log)