LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-22-2007, 11:42 AM   #1
ladio
LQ Newbie
 
Registered: May 2007
Posts: 7

Rep: Reputation: 0
shutdown/Halt system from /etc/rc


Greetings,

I'm experimenting on a thin client based on diet-pc. When the pc starts it will run /etc/rc (specified at /etc/inittab). At /etc/rc i wrote a small script to check for a config file and if it does not exist i want to show a message and then shutdown/halt the machine. I tried to use:
- halt
- shutdown -h now
- init 0
but none of them worked
When i use init 0, i get the the message:
INIT: no more processes left in this runlevel.

Does anyone have any idea how to power off the machine?

Thanks in advance
Ladio
 
Old 09-22-2007, 01:26 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Quote:
Originally Posted by ladio View Post
Greetings,

I'm experimenting on a thin client based on diet-pc. When the pc starts it will run /etc/rc (specified at /etc/inittab). At /etc/rc i wrote a small script to check for a config file and if it does not exist i want to show a message and then shutdown/halt the machine. I tried to use:
- halt
- shutdown -h now
- init 0
but none of them worked
When i use init 0, i get the the message:
INIT: no more processes left in this runlevel.

Does anyone have any idea how to power off the machine?

Thanks in advance
Ladio
The problem may lie in your /etc/inittab, most likely in how you have specified init 0. Could you post your /etc/inittab?

----------------
Steve Stites
 
Old 09-22-2007, 06:12 PM   #3
ladio
LQ Newbie
 
Registered: May 2007
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks Steve,

the following is the /etc/inittab

dflt:3:initdefault:
init::sysinit:/bin/busybox sh /etc/rc
cad::ctraltdel:/sbin/init 6
halt:0:wait:/sbin/shutdown -h now
rebt:6:wait:/sbin/shutdown -r now
logn:12345789:respawn:/sbin/getty/ 38400 tty2
cons:1:wait:/usr/bion/chvt 2
wmgr:345789:respawn:/bin/su - nobody -c "exec /usr/X11R6/bin/evilwm -snap 8"

Thanks in advance
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
halt or shutdown -h now makes the machine reboot mariogarcia Linux - Hardware 4 07-20-2007 05:38 PM
external halt/shutdown button sharadshankar Programming 3 05-17-2006 11:03 AM
I lost the halt command and the shutdown!!!! mago Slackware 7 05-07-2005 05:20 AM
unable to 'shutdown' from x... need to shutdown using 'halt' guitarnix Linux - Newbie 5 11-24-2003 01:00 AM
halt, shutdown, and reboot HappyDude Linux - Software 29 07-24-2003 02:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:31 PM.

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
Open Source Consulting | Domain Registration