diff options
author | WANG Chao <chaowang@redhat.com> | 2013-04-26 15:16:19 +0800 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2013-04-30 12:13:56 +0200 |
commit | b6f2e05819d9867b7ca69365091ff480556fcfe9 (patch) | |
tree | 6005dc0ab44d750091b0861c6302bd40a4ca56a8 /test/TEST-12-RAID-DEG/test.sh | |
parent | 3ed08d1e4dbb52dc181be01b6e147017327aa6d9 (diff) | |
download | dracut-b6f2e05819d9867b7ca69365091ff480556fcfe9.tar.gz dracut-b6f2e05819d9867b7ca69365091ff480556fcfe9.tar.bz2 dracut-b6f2e05819d9867b7ca69365091ff480556fcfe9.zip |
_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>
Diffstat (limited to 'test/TEST-12-RAID-DEG/test.sh')
0 files changed, 0 insertions, 0 deletions