dracut/modules.d/99base
WANG Chao b6f2e05819 _emergency_shell: Show current working directory correctly in shell.
When dropped to emergency shell, for example, use rd.break=pre-pivot,
the PS1 won't correctly show current directory we're in:

pre-pivot:/# cd /sysroot/
pre-pivot:/#
(still shows "/")

Let's take a look at PS1 variable:

(I'm adding prefix/suffix 'x' to make it clear):
pre-pivot:/# echo x${PS1}x
xpre-pivot:/# x
(PS1 isn't dynamic)

Regarding the current dracut code, it should be:

pre-pivot:/# cd /sysroot/etc
pre-pivot:/sysroot/etc#

With this patch:

pre-pivot:/# echo x${PS1}x
xpre-pivot:${PWD}# x
(Now PS1 is dynamic, it will show the directory correctly)

I tested for both normal boot and kdump boot.

Signed-off-by: WANG Chao <chaowang@redhat.com>
2013-04-30 12:13:56 +02:00
..
dracut-lib.sh _emergency_shell: Show current working directory correctly in shell. 2013-04-30 12:13:56 +02:00
init.sh Let user specify the action after fail 2013-04-09 11:14:08 +02:00
initqueue.sh add initqueue --env and "online" hook 2012-03-08 11:05:29 +01:00
loginit.sh base/loginit.sh: revert "quiet" patch 2012-06-04 03:09:09 -04:00
module-setup.sh base/dracut-lib.sh:wait_for_dev()/cancel_wait_for_dev() set systemd timeouts 2013-04-05 08:32:17 +02:00
parse-root-opts.sh parse-root-opts: first check for ro, later for rw 2012-07-26 17:35:59 +02:00
sosreport.sh sosreport: mkdir /run/initramfs, if it does not exist yet 2013-03-16 10:34:20 +01:00