Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

interactive boot

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
mipsan
Posts: 2
Joined: 2016-01-07 10:12

interactive boot

#1 Post by mipsan »

hello,

Debian 8.2 Jessie I have.
I want to add interactive step during Debian boot process.
To do this, added short script into /etc/rc.local to call read command.

Code: Select all

#!/bin/sh

while true; do
        read -p "confirmed? [yN]" yesno
        case $yesno in
            [Yy]* ) echo "done"; break;;
            [Nn]* ) echo "discarded"; exit;;
            * ) echo "pls answer yes or no";;
        esac
done

However, system does not wait and jump to X based login screen.

Any kinds of IDEA would be appreciated.

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1400
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 79 times
Been thanked: 175 times

Re: interactive boot

#2 Post by steve_v »

I'm still getting my head around systemd myself TBH, but your problem is most likely that units/scripts are run asynchronously - it won't wait for your script unless you tell it to, and rc.local fires last anyway.
You'll most likely need to write a systemd .service file to run your script, and make it a dependency of the target you want to wait for it. e.g. 'WantedBy=multi-user.target'
Maybe something like this example.

Again, not a systemd guru, and that example is untested by me... but from what I understand it's the approach you'll need.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

mipsan
Posts: 2
Joined: 2016-01-07 10:12

Re: interactive boot

#3 Post by mipsan »

Thanks,

With your helpful posting, I try to make a systemd service.

I have some problem here, considered to order.
I want to show the dialog box prior to graphical login, and disable other login ttys.
Any Ideas ?

Post Reply