If the root password had not been set, then the script would have to open a terminal window for the user to be able to enter a password, no?

Or at least throw up some kind of error message that there's not a root password set. If curaga is right (I didn't know there's already a root password but hopefully it's randomized one-time-use like Finnix does so someone who figures it out can't pwn every "dsl@box" he sees) you probably want to have the user set one himself regardless. Even if a user uses "secure" cheatcode or has otherwise set one, all he has to do is remember what he used and re-enter it or enter a new one.

--------------"It felt kind of like having a pitbull terrier on my rear end."-- meo (copyright(c)2008, all rights reserved)

This throws up an xterm window prompting for a root password if it has not already been set by the user, and exits when it has been entered.
It looks to me like any time a root password is set, it only has one $ after the 1.

That's because $ has to be escaped in shell scripting because it's designated for variables. It can't have a trailing character or that part will be read as a variable. Try putting each $ you want read as $ in [], like [$].

--------------"It felt kind of like having a pitbull terrier on my rear end."-- meo (copyright(c)2008, all rights reserved)