
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2008-07-22 at 13:18 +0200, Christian Boltz wrote:
Hello,
on Dienstag, 22. Juli 2008, Carlos E. R. wrote: ...
which is a good enough approximation to what I want, thanks. I wrote it as a comment in my script before the chroot command, because after it, it doesn't execute (and I don't want to change the profile or bashrc):
Well, if you put it after the chroot command, it is executed after the chroot _exits_. (You don't see the result because your script ends afterwards.)
Yes, I guessed so.
echo " Copy paste the next line to activate prompt change:"
Ouch. This sounds annoying and error-prone (I'm quite sure you will forget to change the prompt some day...)
I'm sure I will :-) But I'm using to copy-paste commands. I have a file with a list of my most used commands. I even keep a backup of the bash history file!
echo "export PS1=$'\\[\E[1m\E[31m\\]NOT_\\h:\\w # \\[\E(B\E[m\\]'" echo chroot /otros/test_d/ /bin/bash --login
Add the "export PS1" command to /etc/bash.bashrc.local in your factory installation ;-) (create the file if it doesn't exist already)
Ah, that would be better than on on root's home as I was thinking of doing. However, I don't want to see that prompt on the occasions that I do boot my real factory partition, so the copy-paste approach may have to do for the moment :-) Or I might try something with "expect" if I forget too often the copy paste thing. I doubt it, not worth the effort, I think. Maybe... feed a command to "bash --login" thing with an option not to exit? Dunno if possible :-? I'll have to read the man page again. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFIhmqdtTMYHG2NR9URAhWyAJ99wj+lx0GHDE4GtkAgaaoAcAzxHQCfYt7G 3sSfrhV8yOkequhDtZoWI/8= =/X/g -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org