Browse Source

[early] Cleaned sbin/getsh, and changed to receive a full /dev/foo character device, and not just the partial name

karasz/new-early
Alejandro Mery 17 years ago
parent
commit
b047c8b755
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      target/early/initramfs/sbin_getsh.sh

+ 5
- 3
target/early/initramfs/sbin_getsh.sh

@ -13,10 +13,12 @@
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
if [ $# -eq 0 ]; then
vc=${1:-/dev/console}; shift
if [ ! -c "$vc" ]; then
echo "$vc: Invalid terminal" >&2
echo "Usage: \${0##*/} <vc> [<command> <arguments>]"
exit 1
else
vc=${1:-console}; shift
exec setsid "${@:-/bin/sh}" < /dev/$vc > /dev/$vc 2> /dev/$vc
exec setsid "${@:-/bin/sh}" < $vc > $vc 2> $vc
fi

Loading…
Cancel
Save