Re: colored prompt in early userspace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Le mar. 28 mars 2023 à 16:34, lacsaP Patatetom <patatetom@xxxxxxxxx> a écrit :
>
> hi,
>
> when you add the `break` parameter to the list of parameters passed
> when the system boots, you find yourself in an interactive shell that
> allows you to issue commands, perform tests, and so on...
>
> the shell is apparently provided by `ash`.
>
> how to have a colored prompt (which visually helps to detach the
> prompt from the rest) ?
>
> the `~/.profile` file mentioned here and there does not seem to be read/used.
> `/.profile` and `/etc/profile` don't do much better.
> `ashrc` also tested without success.
>
> if the prompt offered at this level can be colored, I think it would
> not be a luxury to implement it directly in mkinitcpio ;-)
>
> regards, lacsaP.

I finally modified the `launch_interactive_shell` function present in
the `/usr/lib/initcpio/init_functions` file which exports the
definition of the prompt :
` export PS1='\n\e[33m(rootfs) \W \$ \e[m' `
not sure if this is the cleanest way to precede...

regards, lacsaP.




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux