LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-31-2008, 12:17 PM   #1
knockout_artist
Member
 
Registered: Sep 2005
Distribution: fedora core 9
Posts: 324

Rep: Reputation: 33
Pssing 2 comands CTR+ALT+DET /etc/inittab ?


Good Day,

Is it possible to pass 2 commands from ctr+alt+del switch.
I tried but it only execute first.
inittab entry:
Code:
# what to do when CTRL-ALT-DEL is pressed
ca::ctrlaltdel:/bin/date > /time ;/sbin/shutdown -r -t 4 now
Any Ideas.

Thanks

Last edited by knockout_artist; 03-31-2008 at 03:46 PM. Reason: change title + contents
 
Old 03-31-2008, 05:13 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
Put those commands in a script instead?
 
Old 03-31-2008, 06:01 PM   #3
knockout_artist
Member
 
Registered: Sep 2005
Distribution: fedora core 9
Posts: 324

Original Poster
Rep: Reputation: 33
I thought so too.


Thank you.

I am assuming you have done that?
 
Old 04-01-2008, 08:25 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
You made backups on removable media and you have a Live CD at hand to regain control if anything b0rks.
There's absolutely nothing that should keep you from testing it yourself.
 
Old 04-02-2008, 10:35 AM   #5
knockout_artist
Member
 
Registered: Sep 2005
Distribution: fedora core 9
Posts: 324

Original Poster
Rep: Reputation: 33
. .

Last edited by knockout_artist; 04-02-2008 at 10:45 AM.
 
Old 04-02-2008, 10:45 AM   #6
prad77
Member
 
Registered: Mar 2008
Posts: 101

Rep: Reputation: 15
May be /bin/date in the script might help.

Gentoo

Last edited by prad77; 04-17-2008 at 04:36 AM.
 
Old 04-02-2008, 10:59 AM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
Quote:
Originally Posted by knockout_artist
Nah

doesn't work

i did this

vi start.sh
Code:
#!/bin/sh
date > /home/me/start1
date > /home/me/start2
Code:
chmod 777 start.sh
moved it to sbin and to etc.
ctrl alt del in inttab looks like
Code:

ca::ctrlaltdel:/sbin/start.sh
tried executing it from etc and sbin.
Nothing happens.

When I run same script with bash like /sbin/start.sh, it works fine.

Any suggestions ?

Thanks you.
As root do "telinit Q" to make it reread inittab. Then try again.
 
Old 04-02-2008, 12:15 PM   #8
knockout_artist
Member
 
Registered: Sep 2005
Distribution: fedora core 9
Posts: 324

Original Poster
Rep: Reputation: 33
lol

I noticed. Its working now.


Thanks
 
Old 04-02-2008, 12:29 PM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
Cool. Next time please don't clean out your posts unless you provide the answer as well. Makes no sense to people who will find the thread.
 
Old 04-02-2008, 02:48 PM   #10
knockout_artist
Member
 
Registered: Sep 2005
Distribution: fedora core 9
Posts: 324

Original Poster
Rep: Reputation: 33
Sorry,
For sure I won't clean the post.

:-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ctr-alt-delete windows = ??? ubuntu jgag123 Linux - Newbie 27 01-11-2008 02:54 PM
CTR-ALT-F1 kills X server arc2v Linux - General 3 05-24-2006 08:04 AM
didn't find virtual text console ctr+alt+F1 like ? viji2ks Linux - Software 4 08-08-2005 09:03 AM
linux equivilant to ctr+alt+del aggierian Linux - Newbie 5 06-09-2004 08:06 AM
GeForce SuSe 9.0 hangs on boot and X ctr-alt-bspace bigearsbilly Linux - Hardware 1 03-07-2004 10:14 PM


All times are GMT -5. The time now is 11:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration