6
1
I am trying to run a small interactive configuration script from systemd on Fedora 19. It has to be run as root, and run prior to the user logging in. I have created a service which looks a bit like this:
[Unit]
Description=blah
Before=graphical.target
[Service]
Type=oneshot
ExecStart=/path/to/script.sh
[Install]
RequiredBy=multi-user.target
and for the sake of simplicity, the script looks like this:
#!/bin/sh
whiptail --msgbox "test" 0 78
But when I load this service and reboot the script output is not displayed and in /var/log/messages it suggest that the TERM variable should be set. But I would have expected the script to be run on the first virtual terminal.
Any suggestions or insight would be greatly appreciated.
Can you pls post the exact error message? – MariusMatutiae – 2013-12-17T18:35:46.990
Sure, the message I get is:
test.sh[418]: TERM environment variable needs set.
However, setting the environment variable in the service leads to the script output being directed into /var/log/messages. – pxul – 2013-12-17T18:37:00.723