Using DHCP to pass server URL
-
Brian Michalski
I'm no DHCP expert, but I don't know how easy this would be for us to implement in an environment where we don't have DHCP control, or any access to those lower-level network functions & configurations.
Here at RPI we started this pilot project using what we had access to, which was only the ability to plug in ethernet and get a valid IP... that said, this might be worth exploring in the future.
Andrew might know a bit more about how feasible this is....
-
Brian Michalski
- State changed from new to open
-
Andrew Armenia
This should be possible by parsing the dhclient.leases file. I'll look at
perhaps trying to package this as a plugin. At the moment, everything is
passed around as environment variables, which are set initially on boot when
config.pl is read, so it might be a bit tricky. But possible nonetheless.-Andrew
-
Kyle Gordon
Hi all,
I must read up about this plugin feature :-) Now that it's the weekend, I'll have a look at cobbling together something that works.
Cheers
Kyle
-
Andrew Armenia
There isn't much documentation yet, which is probably a bug unto itself. But
here's what you'll need to know. Plugins are the .plugin files you see in
the ISO image, and they are SquashFS filesystem images generated using the
mksquashfs program, and combined with the main filesystem via unionfs.The two interesting locations to place files in your plugin are
/etc/init_tasks and /etc/tasks. Executable files in /etc/init_tasks are executed in lexicographical order on initial system boot. Once all tasks in
/etc/init_tasks are completed, executables in /etc/tasks are spawned in separate processes. If a program in /etc/tasks dies, it is automatically
respawned after a brief delay.Also, /etc/xtasks.pl is run by /etc/init_tasks/xserver.pl to spawn all
necessary X11 clients. Actually, this is probably where you'll want to place
your code. For development purposes, it might be helpful to ssh into a
running box and look around. For instance, if you edit /etc/xtasks.pl in
place on a box, then "killall Xorg" or something similar, you should be able
to do some testing on the fly before you build and deploy the plugin.For integration with the existing Concerto boot scripts, I'd recommend
writing your plugin's scripts in Perl. I'm not sure whether our released ISO
images contain the bootup splash screen server (look for
splash-server.plugin, or a blue-and-white Concerto splash screen on boot).
If they do, your script can use the Concerto::InitScript module to interact
with the splash screen's text display area. init_script("message") displays
a message on the splash screen, and log_and_splash("message") allows
printing of diagnostic messages on the bottom area of the screen.We're using ISC's dhclient as the DHCP client right now.
Sorry for the lack of documentation - please let me know if you have any
more questions.-Andrew
-
Brian Michalski
- Tag changed from administration, config, dhcp to administration, config, dhcp, v1
-
Brian Michalski
- State changed from open to resolved
- Milestone order changed from 0 to 0
(from [083e69a118a59e32bcb2e8760684cdee485a5d46]) Better handle content type errors. Closes #70 Using DHCP to pass server URL. https://github.com/concerto/concerto/commit/083e69a118a59e32bcb2e87...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.