TransWikia.com

Run script with user input during startup before xfce

Ask Ubuntu Asked on November 23, 2021

I’m trying to create configuration script that is doing some network related configuration during system startup. This configuration needs user input, so start process should be stopped and continued after script finishes. I created my service with such config file:

[Unit]
Description=Check config
After=network.target
Before=network-online.target

[Service]
Type=oneshot
TTYPath=/dev/tty13
ExecStartPre=/usr/bin/chvt 13
ExecStart=/opt/custom/config_script.sh
ExecStartPost=/usr/bin/chvt 1
TimeoutStartSec=0
StandardInput=tty
TTYVHangup=yes
TTYVTDisallocate=yes

[Install]
WantedBy=multi-user.target

I enabled my service and after reboot I see that it is executed. It shows that user input is expected, but start process doesn’t stop and soon after that XFCE is started. I have no chance to enter my input, so the script could finish. How can I achieve expected behavior? I use live USB with persistence, but this probably doesn’t affect this case.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP