On Thursday 17 April 2008, James Westby wrote: > > You read password-crypted to see if it is preseeded. This value > > presumably already _is_ encrypted, but you still pass it through > > 'password --md5'. > > The encryption call is in the else branch, and so it should not > happen when the value was preseeded. There is "password --md5" echoed > to the tempfile, but this just indicates that the password is encrypted.
Right. I misread that. Sorry. > > Also, why is the output of the password command _appended_ to the temp > > file? That would seem to break idempotency. > > That's just because it follows the code that was there before, I'd > be happy to test it if you think that it would be necessary. Nope. The current code has a single ">", yours has ">>". > The temp file is removed after the sed command that puts it in to the > menu.lst. Is there an issue that the sed command would end up being run > twice, giving you two password lines in the final menu.lst? OK. That means it is probably not a problem in practice. However, it is still not correct to append to the file as the sed statement only works correctly if the file contains a single line. In theory some other script could use the same temp file for other purposes and leave it around. > I haven't tested it with preseeding. Entering the password after reboot > does work for the non-preseeded case. Please do test it with preseeding too, both for clear text and encrypted. Note that you can also preseed by passing <template>=<value> at the boot prompt. You don't need to use a preconfiguration file. Cheers, FJP -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]