* Dave Wilder <d.wil...@f5.com> [2012-06-28 12:54]: > > Can a Python script be written that has the ability to stop a Linux > device in the middle of a boot when a certain sequence occurs and then > perform an action? > > For example, when I boot my switch (w/ Linux OS 2.7.3), I want to stop > the boot when I see a series of asterisks. When I see this, I need to > hit the <ESC><SHIFT><9> sequence. Then, I need to select a menu > option (e.g. 1 to run a test or Q to quit and continue w/ the boot). > Another example would be when doing a PXE boot, selecting the image to > load when prompted during the reboot.
Probably not. The issue is that you are dealing with the bootstrap process of a system. Typically, this is not a place where any semblance of external user interaction exists. The examples you show represent compiled-in options that are more likely part of the initial ramdisk, BIOS-level code for a specific device, or something similar. The PXE boot menu example is usually something that's being presented by an external server (via cobbler, or a similar product). There isn't an OS at that point that would likely be able to supply a python environment to use. I think we would need to better understand exactly what you are trying to build, but you are probably looking for something that would be a much lower level than python. -- David Rock da...@graniteweb.com
pgp7NxdORAGka.pgp
Description: PGP signature
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor