Retrieve ping.conf from external source

Installation issues, feature requests, help, etc.

Moderators: A_Null, Curtis8

Retrieve ping.conf from external source

Postby nickf » Fri Jul 06, 2007 12:43 pm

Hi is there any chance of making PING retrieve ping.conf from an external source? Maybe TFTP.

I am hoping to use it at my company. At the moment following the full procedure to modify a PXE image to change ping.conf is too complex for normal windows admins. This is stopping me from pushing PING as a viable solution. They are worried about upgrades.....etc

If PING could get ping.conf from a TFTP server if it booted from PXE or something like that, then it would be amazing and also very simple to change configuration on the fly.
nickf
 
Posts: 24
Joined: Fri Jul 06, 2007 12:37 pm

Postby Natan » Fri Jul 06, 2007 1:31 pm

Hi Nick,

I understand your problem. The main thing is that the ping.conf is especially used to store network parameters, so it would be problematic to try and get it from the network. On another hand, the idea to use dhcp/tftp is not bad. The very behaviour of PXE could be reproduced, depending the MAC address, for example. Beside that, if we added a parameter telling which image to deploy, then we could finally obtain a dynamical ping.conf depending only on the MAC address, thus permitting a central administration.

Before scheduling any coding, did I understand correctly your need?

Regards
Natan

Don't forget to help improve PING Advocacy!
Keep informed about PING updates: subcribe to PING newsletter.
User avatar
Natan
Site Admin
 
Posts: 1754
Joined: Sun Nov 20, 2005 12:29 am

Postby nickf » Fri Jul 06, 2007 1:50 pm

Yes I think more or less.

My problem at where I work, is that its 100% windows and the admins apart from me are 100% windows. Some of these admins are confused by cmd.exe, let alone unpacking,modifying and repacking in linux console.

They really like PING and are impressed with it once I modify the image to include a ping.conf, plus quote out some of the prompts, like the welcome screen and Press enter or X.

However the fact that you have to modify the image with a new ping.conf each time a new version comes out scares them. If they could just simply edit a text file on the TFTP server, or edit variables in the PXE config, then they would take it on board 100%.

Does that make sense?

I don't know whether you can query the DHCP server to get the "next server" option and then TFTP the file from there?
nickf
 
Posts: 24
Joined: Fri Jul 06, 2007 12:37 pm

Postby Curtis8 » Tue Jul 10, 2007 3:47 am

Is it not possible Natan to add the info or even a link to the file in the arguments to the kernel when called from the default file for PXE? I mean you already have the initrd.gz file copied automatically with tftp why not the ping.conf file as well?
Curtis

If you can read this, help me by going to the following link (can only go once per day)
http://s13.bitefight.org/c.php?uid=32058

Thank you
User avatar
Curtis8
Site Janitor
 
Posts: 1119
Joined: Thu Mar 01, 2007 3:22 pm
Location: Canada

Postby nickf » Fri Jul 13, 2007 9:24 am

Hi,

I have been doing a little research. I couldn't seem to retrieve the TFTP server setting from the dhcpcd client.

However I found that I could place variables in the Kernel options in the PXE config file in the APPEND section.

eg
TFTPSERVER=***.***.***.***
and
PINGCONF=<path>/ping.conf

I could then extract these variables with:-
TFTPSERVER = `cat /proc/cmdline | sed 's/.*TFTPSERVER=\([^ ]*\.*/\1/'`
PINGCONF = `cat /proc/cmdline | sed 's/.*PINGCONF=\([^ ]*\.*/\1/'`

Then used the following commands to pull the ping.conf down:-
cd /etc
echo get $PINGCONF | tftp $TFTPSERVER


The only problem I encountered was that there was no /etc/services or /etc/protocols. I had to add these two files with UDP and TFTP definitions to get TFTP to work. I don't know why these files are missing by default.

Do you think it would be possible to intergrate this into the next version of Ping?
nickf
 
Posts: 24
Joined: Fri Jul 06, 2007 12:37 pm

Postby Natan » Fri Jul 13, 2007 10:16 am

Hi!
Thanks for the research. Don't you think the best choice would finally be to put *every* ping.conf parameter in the kernel cmdline? i could integrate it easily in a future release...

Regards
Natan
User avatar
Natan
Site Admin
 
Posts: 1754
Joined: Sun Nov 20, 2005 12:29 am

Postby nickf » Fri Jul 13, 2007 10:22 am

Possibly. I wasn't sure how many plans you had for ping.conf. If PING ever gets more features with more settings it might get a little crowded on that line. Either as long as it works, I don't think it matters too much though.

Would it also be possible to have settable options to bypass the welcome screen. Ideally I would like it to boot straight to the username password screen, the once entered, straight to the main menu.

Thanks.
nickf
 
Posts: 24
Joined: Fri Jul 06, 2007 12:37 pm

Postby Curtis8 » Fri Jul 13, 2007 1:17 pm

I would prefer the ping.conf file as opposed to the command line options. I agree with nickf that the line will become very crowded. Also if we do expand on the ping.conf options (eg: skip log-on screen, restore certain image, make image to location) then it keeps everything in a nice tidy textfile location. There is no reason why we cannot add anything we want to the ping.conf file, however, I do caution against adding to the kernel append option.

Just my thoughts :D
Curtis

If you can read this, help me by going to the following link (can only go once per day)
http://s13.bitefight.org/c.php?uid=32058

Thank you
User avatar
Curtis8
Site Janitor
 
Posts: 1119
Joined: Thu Mar 01, 2007 3:22 pm
Location: Canada

Postby Curtis8 » Tue Aug 28, 2007 6:25 pm

I was pondering this today and wondered if using dhcp options would work. I know that the ping.conf file does everything, but what if you could set the options for the dhcp to point to a image server, user/pass, and image to restore? We talked about kernel options, and compiling the ping.conf in the intird.gz (which I am not Linux savvy enough to do even that :( ) but I can set other options in my dhcp server. Only a thought.
Curtis

If you can read this, help me by going to the following link (can only go once per day)
http://s13.bitefight.org/c.php?uid=32058

Thank you
User avatar
Curtis8
Site Janitor
 
Posts: 1119
Joined: Thu Mar 01, 2007 3:22 pm
Location: Canada

Re: Retrieve ping.conf from external source

Postby Ailianne » Fri Oct 01, 2010 6:51 am

hello..!!!
Curtis8.. can you sent me an info
about the on how Retrieve ping.conf from external source??
Btw i am newbie her..thanks a lot!!!
god bless,

regards,
treatment for depression
Ailianne
 
Posts: 2
Joined: Fri Oct 01, 2010 6:43 am


Return to PING / General Discussions

Who is online

Users browsing this forum: No registered users and 2 guests