Merge pull request #2996 from ijc/init-no-spurious-tty-files

Avoid writing to tty devices which don't actually exist.
This commit is contained in:
Rolf Neugebauer 2018-04-09 15:28:19 +01:00 committed by GitHub
commit 78e0305666
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,9 @@ if [ -f /etc/issue ]; then
console=*)
fulltty=${opt#console=}
tty=${fulltty%,*}
cat /etc/issue >> /dev/$tty
if [ -c "/dev/$tty" ] ; then
cat /etc/issue >> "/dev/$tty"
fi
esac
done
fi