简体   繁体   English

如何使用Upstart将Node.js脚本用作TTY

[英]How to use Node.js script as TTY using Upstart

I've got a Node.js command line interface that I'd like to use by default when booting up this Linux system, which is using Upstart (RHEL). 在启动使用Upstart(RHEL)的Linux系统时,我默认要使用Node.js命令行界面。

Right now I'm trying to replace the default TTY, mingetty, with my own script, I just haven't had any luck. 现在,我正在尝试用自己的脚本替换默认的TTY,mingetty,但我还没有运气。

I've added my own .conf script to /etc/init that runs the script, but when I override the tty.conf and the serial.conf, I get an empty shell, it never displays my script's output. 我已经在运行该脚本的/ etc / init中添加了自己的.conf脚本,但是当我覆盖tty.conf和serial.conf时,我得到了一个空的shell,它从不显示脚本的输出。

What am I missing? 我想念什么?

The utility openvt is used for exactly this. 实用程序openvt正是用于此目的。 For example, copy /etc/init/start-ttys.conf into a /etc/init/start-ttys.override as Upstart likes you to do when editing its init files, and replace the line that calls mingetty with a line that asks openvt to run your utility. 例如,将/etc/init/start-ttys.conf复制到/etc/init/start-ttys.override因为Upstart会像您在编辑其init文件时一样执行此操作,然后将替换为mingetty的行替换为openvt运行您的实用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM