MENU question/problem

Scott mree3 at yahoo.com
Tue Mar 14 10:14:37 CET 2006


My permissions were wrong.  I did not have
30-menu.source chmod'ed to 755.  Now that I have
corrected that, and I am using this example code:
#! /bin/sh

/tmp/ip
     dialog --title "FAI (Fully Automatic
Installation)" \
          --menu "Choose the type of installation:" 15
64 6 \
               SCOREBOARD "Scoreboard Plasma
Controller" \
                    SCORING "Judges scoring control
laptops" \
                         2>$tmp 1>/dev/console
                         
                         
                         
                         clear
                         
                         # define the new class
                         catnc 'cat $tmp'
                         rm -f $tmp
                         
                         dialog --title "FAI"
--inputbox "Input desired hostname:" 10 30
                         2>$tmphostname 1>/dev/console
                         clear
                         hostname -F $tmphostname
                         
                         dialog --title "FAI"
--inputbox "Input desired IP Address:" 10
                         30 2>$ip 1>/dev/console
                         clear
                         
That I found here:
http://archives.free.net.ph/message/20060207.135149.89d24ccb.en.html
but that does not work for me. I do see the menu, but
I get errors starting with "/tmp/ip: No such file or
directory" to a Hostname syntax error.  I was hoping
that there was a working example of a class that will
take typed input (say a new IP address) and actually
change the IP address to what the user types in.  If
there is not a working example, could someone please
point me to where I could find info on how to do it? 
I have looked through the wiki and searched this
mailing list archive and I cannot seem to find the
info.  

Thank you

--- Scott <mree3 at yahoo.com> wrote:

> Hello,
> 
>  Well.. I have copied this code directly from here:
>
http://www.teddy-net.com/archive/sources/fai/fai-installation-scripts-tree/class/S30menu.source
> 
> But, I put it in my class dir, rebuilt a cd and now
> I
> see (from the fai.log) that it is running the file..
> but it is not asking me any questions.  I assume it
> is
> because of this line:
> # print menu only when class MENU is defined
> 
> Where do I need to define "MENU"?  I have the
> 30-menu.source in my class dir already.
> 
> Thanks
> 
> 
> --- Michael Tautschnig
> <michael.tautschnig at zt-consulting.com> wrote:
> 
> > > Ok,
> > > 
> > >  I now have:
> > > 30-menu.source in my class directory.  The
> > > 30-menu.source looks like:
> > > 
> > [...] (didn't check whether the code is correct)
> > > 
> > > Don't I need to be calling this file from
> > somewhere? 
> > > Or is that all I need to do?
> > > 
> > That's FAI's job :-) 
> > 
> > > I also see that some places the script is called
> > as:
> > > 30-menu.source and some call it
> > > S30-menu
> > > Does that make a difference?
> > >
> > 
> > The difference is that the latter (S30...) is
> > deprecated.
> > 
> > Regards,
> > Michael
> > 
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the linux-fai mailing list