I'm not real happy with how I'm doing this. It's obviously not as clean
or as simple as a shell script would be, but that's to be expected since
we have to emulate with those shell commands--whole programs in their
own right--do. But right now, the logic doesn't flow right either for a
structured program or an unstructured shell script. Probably trying to
do too much in one go there.
This script replaces--or rather will eventually replace--the bash script
that installs netboot files in /media/A2SHARED. It generally is going
to be implemented for now as a copy of the shell script, not quite
verbatim. For example, rather than run individual commands with sudo,
it re-runs itself with sudo. And rather than force scriptURL to include
a trailing slash, it explicitly chops the slash off to behave more like
you'd expect directories to.
Also, the body of installing the netboot files will be built as a
function rather than as straight script execution. Basically the idea
there is to begin breaking the components of the netboot script into
their own functions that can be accessed independently in the future.
One step at a time there.
Anyway, very little of the script is done yet. This is just to begin
the process and perhaps elicit some feedback if I'm really doing
something totally wrong here--my python's a little rusty.
Previously I "fixed" this by deleting the blank lines and Ivan mentioned
the blank lines were intentional. I noted I should do something like
this to correct it, but didn't. I'll fix it there later.