From c155a9db695f3f5e114a36b9075843a045e2c80f Mon Sep 17 00:00:00 2001 From: "Leigh B. Stoller" Date: Mon, 17 Jun 2002 15:20:47 +0000 Subject: [PATCH] Add "imageable" to node_types field to control whether user can create images from/for each node type. Use this in the newimageid forms to present a shortened list of node types. Also, add a footnote explaining typical usage. --- www/newimageid.php3 | 13 +++++++++++-- www/newimageid_ez.php3 | 13 +++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/www/newimageid.php3 b/www/newimageid.php3 index 156ef2acc..8fbe44edd 100644 --- a/www/newimageid.php3 +++ b/www/newimageid.php3 @@ -25,10 +25,14 @@ if (! count($projlist)) { } # -# Need a list of node types. +# Need a list of node types. We join this over the nodes table so that +# we get a list of just the nodes that currently in the testbed, not +# just in the node_types table. # $types_result = - DBQueryFatal("select distinct type from nodes where role='testnode'"); + DBQueryFatal("select distinct n.type from nodes as n ". + "left join node_types as nt on n.type=nt.type ". + "where nt.imageable=1"); # # Helper function to write out a menu. @@ -365,6 +369,11 @@ function SPITFORM($formfields, $errors)
  • The image file must reside in the project directory.
  • Specify the node types that this image will be able to work on (ie: can be loaded on and expected to work). + Typically, images will work on all of the \"pc\" types when + you are customizing one of the default images. However, + if you are installing your own OS from scratch, or you are + using DOS partition four, then this might not be true. + Feel free to ask us!
  • If you already have a node customized, enter that node name (pcXXX) and the image will be auto created for you. Notification of completion will be sent to you via email. diff --git a/www/newimageid_ez.php3 b/www/newimageid_ez.php3 index b608b5088..f96c83ade 100644 --- a/www/newimageid_ez.php3 +++ b/www/newimageid_ez.php3 @@ -41,10 +41,14 @@ if (! count($projlist)) { } # -# Need a list of node types. +# Need a list of node types. We join this over the nodes table so that +# we get a list of just the nodes that currently in the testbed, not +# just in the node_types table. # $types_result = - DBQueryFatal("select distinct type from nodes where role='testnode'"); + DBQueryFatal("select distinct n.type from nodes as n ". + "left join node_types as nt on n.type=nt.type ". + "where nt.imageable=1"); # # Spit the form out using the array of data. @@ -331,6 +335,11 @@ function SPITFORM($formfields, $errors)
  • Specify the node types that this image will be able to work on (can be loaded on and expected to work). + Typically, images will work on all of the \"pc\" types when + you are customizing one of the standard images. However, + if you are installing your own OS from scratch, or you are + using DOS partition four, then this might not be true. + Feel free to ask us!
  • If you already have a node customized, enter that node name (pcXXX) and the image will be auto created for you. Notification of completion will be sent to you via email. -- GitLab