[Ultrapossum-cvs 267] demo/uml 1.4,1.5,update-uml

Back to archive index

Masato Taruishi taru****@sourc*****
2004年 7月 2日 (金) 03:41:58 JST


===================================================================
RCS file: demo/uml/update-uml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- demo/uml/update-uml	2004/06/30 19:18:38	1.4
+++ demo/uml/update-uml	2004/07/01 18:41:58	1.5
@@ -33,10 +33,28 @@
     eval "`$MODULEDIR/uml/map $h`"
     install -d $UMLDIR/$h
     $MODULEDIR/uml/rootstrap.sh $h > $UMLDIR/$h/rootstrap.conf
-    echo "$host $h" >> $UMLDIR/hosts
+    echo "$uml $h" >> $UMLDIR/hosts
+  done
+  for h in $MASTER $SLAVES
+  do 
+    if ! include $h "$UML_HOSTS"; then
+      echo "`getip $h`" $h >> $UMLDIR/hosts
+    fi
   done
   chown -R $UML_USER $UMLDIR/
   progress "Configuring User-Mode-Linux... done"
+}
+
+# getip <hostname>
+getip() {
+  ip="`gethostip -d $1`"
+  if test "$ip" = "127.0.0.1"; then
+    echo "$host"
+  elif test -n "$ip"; then
+    echo "$ip"
+  else
+    echo "can't resolve: $1" 1>&2
+  fi
 }
 
 remove() {



Ultrapossum-cvs メーリングリストの案内
Back to archive index