I cam currently building a miniroot with an Ubuntu 15.10 base. Therefore I want to use systemd. My standard script '/etc/init.d/script' is found and executed by systemd. However I also do have a conf for this script located at /etc/init/script.conf is not executed. Therefore I write this systemd script
[Unit]
Description=Job that starts the startmaster.sh in /usr/bin/local/
Requires=script.service
After=script.service
[Service]
Type=forking
ExecStart=/sbin/getty -l /usr/local/bin/startmaster.sh -n 38400 tty6
[Install]
WantedBy=multi-user.target
this script is executed on boot, but it does not show the expected behaviour
content of startmaster.py #!/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
#vt=$1
vt=6
sleep 1
chvt $vt
sleep 1
chvt $vt
sleep 1
chvt $vt
screen -U master.py
exec getty 38400 tty$vt
dmesg shows the following segfault
[ 2106.122116] master.py[3960]: segfault at 0 ip 00007f731ccfa892 sp 00007ffdb76d5620 error 4 in libc-2.21.so[7f731cc76000+1c0000]
any suggestions how to fix this