Operating System - HP-UX
1821588 Members
3520 Online
109633 Solutions
New Discussion юеВ

Re: Restricting from SHUTDOWN script Interruption

 
SOLVED
Go to solution
rveri
Super Advisor

Restricting from SHUTDOWN script Interruption

Hi all ,

I have made on script in .profile of shut user.
So that shut user can shutdown the system directly without logging on root.

#cd /shut
#vi .profile

cd /
/sbin/shutdown -y -h 0
exit

But the problem is that , while executing if i press , it gets interrupted and i gets # .

How to make it secure. so that it should not be interrupted and not to get superuser #.

Thanks in Advance.

Rveri.
------
2 REPLIES 2
Raj D.
Honored Contributor
Solution

Re: Restricting from SHUTDOWN script Interruption

Hi Rveri ,

Do the following ,
Just remove the interrupt routine for to something else. That will solve the problem.

Add the following to your begining of the script

stty intr ""

..
..
cd /
/sbin/shutdown -y -h 0
exit

Hope this will help you.

Cheers ,

Raj. D.
-------
" If u think u can , If u think u cannot , - You are always Right . "
rveri
Super Advisor

Re: Restricting from SHUTDOWN script Interruption

Thanks , who ever replied .
Well that one is working ..10 points to Raj.
Now its cant stop with . Thanks.