Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Bash script in raspberry pi

Status
Not open for further replies.

hemnath

Advanced Member level 3
Advanced Member level 3
Joined
Jun 24, 2012
Messages
702
Helped
61
Reputation
120
Reaction score
57
Trophy points
1,308
Location
Chennai
Activity points
6,589
Hi,

I have a bash script running at startup and it is included in rc.local.

The script has options like. When some condition fails, it power OFF the system.

Part of code:
Code: Select all
if [ $match = 1 ]
then
echo "OK"
else
echo "NOT OK"
sudo halt -p
fi
If match is not 1, then power OFF the system.

In some cases, if that condition happens, I want to bypass the system power off by entering some password. It should wait for 10 seconds for keyboard input for password entering. if password is wrong or nothing typed within 10 seconds, it should halt the system. How can it done?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top