SHA256
1
0
forked from pool/libguestfs

- use ttyS0 for setctsid if /proc/consoles does not exist

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=102
This commit is contained in:
Olaf Hering 2012-09-20 15:40:50 +00:00 committed by Git OBS Bridge
parent e149406abb
commit 655fe5ff27
2 changed files with 13 additions and 4 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Sep 20 17:39:23 CEST 2012 - ohering@suse.de
- use ttyS0 for setctsid if /proc/consoles does not exist
-------------------------------------------------------------------
Wed Sep 19 23:48:08 CEST 2012 - ohering@suse.de

View File

@ -154,10 +154,14 @@ else
# Use appliance in rescue mode, also used by the virt-rescue command.
eval $(grep -Eo 'TERM=[^[:space:]]+' /proc/cmdline)
PS1='><rescue> '
console_major_minor="`sed 's@^.* @@;p;Q' < /proc/consoles `"
console_dev="`find /sys/ -name dev -type f -print0 | xargs -0 --no-run-if-empty grep -m 1 -l ${console_major_minor}`"
console_kname=${console_dev%/dev}
console_kname=${console_kname##*/}
console_kname=ttyS0
if test -f /proc/consoles
then
console_major_minor="`sed 's@^.* @@;p;Q' < /proc/consoles `"
console_dev="`find /sys/ -name dev -type f -print0 | xargs -0 --no-run-if-empty grep -m 1 -l ${console_major_minor}`"
console_kname=${console_dev%/dev}
console_kname=${console_kname##*/}
fi
export TERM PS1
echo
echo "------------------------------------------------------------"