projects/RPi*: add serial console service

Add a console shell for debugging a Raspberry Pi. The shell is added
conditionally if the console parameter appears in the kernel command
line.

The service file follows the template provided by stefansaraev [1].

[1] http://sprunge.us/cBdT
This commit is contained in:
Haggai Eran 2015-05-25 22:38:02 +03:00 committed by Stephan Raue
parent 0dfc5cdacd
commit a09ae66ee4
2 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,21 @@
[Unit]
Description=Debug Shell on /dev/console
DefaultDependencies=no
ConditionKernelCommandLine=console
[Service]
WorkingDirectory=/storage
ExecStart=/bin/sh -c '. /etc/profile; exec /bin/sh'
Restart=always
RestartSec=0
StandardInput=tty
TTYPath=/dev/console
TTYReset=yes
TTYVHangup=yes
KillMode=process
IgnoreSIGPIPE=no
# bash ignores SIGTERM
KillSignal=SIGHUP
[Install]
WantedBy=sysinit.target

View File

@ -0,0 +1,21 @@
[Unit]
Description=Debug Shell on /dev/console
DefaultDependencies=no
ConditionKernelCommandLine=console
[Service]
WorkingDirectory=/storage
ExecStart=/bin/sh -c '. /etc/profile; exec /bin/sh'
Restart=always
RestartSec=0
StandardInput=tty
TTYPath=/dev/console
TTYReset=yes
TTYVHangup=yes
KillMode=process
IgnoreSIGPIPE=no
# bash ignores SIGTERM
KillSignal=SIGHUP
[Install]
WantedBy=sysinit.target