Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc568dd
commit 344b676
Showing
3 changed files
with
66 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/sh | ||
|
||
#set -e | ||
|
||
# initramfs-tools header | ||
|
||
PREREQ="" | ||
|
||
prereqs() | ||
{ | ||
echo "${PREREQ}" | ||
} | ||
|
||
case "${1}" in | ||
prereqs) | ||
prereqs | ||
exit 0 | ||
;; | ||
esac | ||
|
||
# live-initramfs header | ||
|
||
# this bottom script currently only works with upstart | ||
if [ ! -d /root/etc/init ] | ||
then | ||
exit 0 | ||
fi | ||
|
||
. /scripts/live-functions | ||
|
||
# live-initramfs script | ||
|
||
for ARGUMENT in $(cat /proc/cmdline) | ||
do | ||
case ${ARGUMENT} in | ||
serialtty=*) | ||
tty="${ARGUMENT#serialtty=}" | ||
|
||
log_begin_msg "Setting up a serial tty..." | ||
|
||
cat > /root/etc/init/${tty}.conf <<EOF | ||
start on stopped rc RUNLEVEL=[2345] | ||
stop on runlevel [!2345] | ||
respawn | ||
exec /sbin/getty 115200 ${tty} | ||
EOF | ||
|
||
log_end_msg | ||
;; | ||
esac | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters