Masato Taruishi
taru****@sourc*****
2004年 7月 9日 (金) 11:45:52 JST
=================================================================== RCS file: demo/uml/debian/config,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- demo/uml/debian/config 2004/07/03 10:22:39 1.3 +++ demo/uml/debian/config 2004/07/09 02:45:52 1.4 @@ -17,12 +17,38 @@ done fi +uml_mirror_candidates=$(egrep "^deb[[:space:]]+(http|ftp)://[^[:space:]]+[[:space:]]+[^[:space:]]+[[:space:]]+" /etc/apt/sources.list | sed -e 's/^deb[ ]*\([^ ]*\).*/\1/g' | tr '\n' '#' | sed 's/#/, /g') + db_subst ultrapossum-uml/uml_hosts hosts "$uml_hosts" -db_set ultrapossum-uml/uml_hosts "`echo $UML_HOSTS | sed 's/ /, /g'`" -db_set ultrapossum-uml/uml_dist "$UML_DIST" -db_set ultrapossum-uml/uml_mem "$UML_MEM" +db_subst ultrapossum-uml/uml_mirror_candidates candidates "$uml_mirror_candidates" + +db_fget ultrapossum-uml/uml_hosts seen +if test "x$RET" = "xfalse" || test "x$1" = "xreconfigure"; then + db_set ultrapossum-uml/uml_hosts "`echo $UML_HOSTS | sed 's/ /, /g'`" +fi + +db_fget ultrapossum-uml/uml_dist seen +if test "x$RET" = "xfalse" || test "x$1" = "xreconfigure"; then + db_set ultrapossum-uml/uml_dist "$UML_DIST" +fi + +db_fget ultrapossum-uml/uml_mem seen +if test "x$RET" = "xfalse" || test "x$1" = "xreconfigure"; then + db_set ultrapossum-uml/uml_mem "$UML_MEM" +fi + db_input medium ultrapossum-uml/uml_dist || true db_input low ultrapossum-uml/uml_mem || true db_input high ultrapossum-uml/uml_hosts || true +db_input medium ultrapossum-uml/uml_mirror_candidates || true + db_go + +db_get ultrapossum-uml/uml_mirror_candidates +if test "x$RET" = "xmisc"; then + db_input medium ultrapossum-uml/uml_mirror + db_go +else + db_set ultrapossum-uml/uml_mirror "$RET" +fi =================================================================== RCS file: demo/uml/debian/templates,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- demo/uml/debian/templates 2004/07/03 10:16:24 1.2 +++ demo/uml/debian/templates 2004/07/09 02:45:52 1.3 @@ -14,3 +14,14 @@ Type: string Description: How many memories do you want to allocate for a virtual server? +Template: ultrapossum-uml/uml_mirror_candidates +Type: select +Choices: ${candidates} misc +Default: misc +Description: Which host do you retrive packages from? + +Template: ultrapossum-uml/uml_mirror +Type: string +Default: http://http.us.debian.org/debian/ +Description: Where do you retrieve packages from? + =================================================================== RCS file: demo/uml/debian/ultrapossum-uml.postinst,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- demo/uml/debian/ultrapossum-uml.postinst 2004/07/03 15:40:08 1.6 +++ demo/uml/debian/ultrapossum-uml.postinst 2004/07/09 02:45:52 1.7 @@ -35,7 +35,9 @@ UML_DIST=$RET db_get ultrapossum-uml/uml_mem UML_MEM=$RET - ultrapossum-config set uml UML_HOSTS="$UML_HOSTS" UML_DIST="$UML_DIST" UML_MEM="$UML_MEM" + db_get ultrapossum-uml/uml_mirror + UML_MIRROR=$RET + ultrapossum-config set uml UML_HOSTS="$UML_HOSTS" UML_DIST="$UML_DIST" UML_MEM="$UML_MEM" UML_MIRROR="$UML_MIRROR" /usr/share/ultrapossum/update.d/update-uml configure for h in $UML_HOSTS do