LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 09-12-2012, 05:31 AM   #1
sardinha
Member
 
Registered: Aug 2012
Location: Portugal
Distribution: Slackware, Salix OS
Posts: 51

Rep: Reputation: 10
Slackware-current need a double reboot command to really reboot the system


Hello,

If I run reboot ou halt command on the system, it's only terminate some processes and doesn't finish the reboot.
Output from messages log:
Quote:
shutdown[1872]: shutting down for system reboot
init: Switching to runlevel: 6
init: no more processes left in this runlevel
Then after ran again reboot command the system finishing the reboot.

To really reboot I'm using a double command:
Code:
# reboot && reboot
Anyone with the same problem with current version (64-bits)?

Thank you.

Pedro Correia Sardinha
 
Old 09-12-2012, 05:39 AM   #2
Celyr
Member
 
Registered: Mar 2012
Location: Italy
Distribution: Slackware+Debian
Posts: 314

Rep: Reputation: 77
I'm not going to say that
Code:
# reboot
has not to be used but
Code:
# shutdown -r now
it's safer (and well, it works).
The behavior of
Code:
# reboot
changes if you are on a specific runlevel I find shutdown to be more consistent.
BTW: what you are doing with
Code:
# reboot && reboot
it's evil, read the reboot manual for clarification.
I have slackware-current and reboot it's working as expected, Maybe you messed up with rc scripts ?

Last edited by Celyr; 09-12-2012 at 05:42 AM.
 
Old 09-12-2012, 05:47 AM   #3
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,042

Rep: Reputation: 761Reputation: 761Reputation: 761Reputation: 761Reputation: 761Reputation: 761Reputation: 761
...and if you really want to do it quick and clean (as root, su -, sudo):
Code:
init 6
Or, take it to single-user mode
Code:
init 1
do some stuff (like updates) then
Code:
init 6
And life is good.

Oops, forgot shut it off:
Code:
init 0
Hope this helps some.

Last edited by tronayne; 09-12-2012 at 05:50 AM.
 
Old 09-12-2012, 05:51 AM   #4
Celyr
Member
 
Registered: Mar 2012
Location: Italy
Distribution: Slackware+Debian
Posts: 314

Rep: Reputation: 77
His rc.6 is "damaged" I think, what's the output of
Code:
# ls -lash /etc/rc.d/rc.6
 
Old 09-12-2012, 06:00 AM   #5
sardinha
Member
 
Registered: Aug 2012
Location: Portugal
Distribution: Slackware, Salix OS
Posts: 51

Original Poster
Rep: Reputation: 10
Thank you Celery and tronayne for your replies.

Resulting no difference by running:
Code:
# shutdown -r now

Code:
# ls -lash /etc/rc.d/rc.6
Give this output:
8.0K -rwxr-xr-x 1 root root 7.6K Aug 15 00:03 /etc/rc.d/rc.6

Thank you.
 
Old 09-12-2012, 06:01 AM   #6
Celyr
Member
 
Registered: Mar 2012
Location: Italy
Distribution: Slackware+Debian
Posts: 314

Rep: Reputation: 77
then it's your inittab, please attach the result of
Code:
# cat /etc/inittab
 
Old 09-12-2012, 06:11 AM   #7
sardinha
Member
 
Registered: Aug 2012
Location: Portugal
Distribution: Slackware, Salix OS
Posts: 51

Original Poster
Rep: Reputation: 10
Celyr,

Attached inittab!

Thank you.
Attached Files
File Type: txt inittab.txt (2.4 KB, 15 views)
 
Old 09-12-2012, 06:33 AM   #8
Celyr
Member
 
Registered: Mar 2012
Location: Italy
Distribution: Slackware+Debian
Posts: 314

Rep: Reputation: 77
It looks ok.
try
Code:
$ md5sum /etc/rc.d/rc.6
d3b597a1a0c0b1891dc613da9cdb20d3  /etc/rc.d/rc.6
my is vanilla, if your it's not same as mine you may want to get it back with
Code:
# slackpkg reinstall sysvinit-scripts
your inittab has CRLF newline
Code:
# Runlevel 6 reboots the system.^M$
l6:6:wait:/etc/rc.d/rc.6^M$
^M$
do a
Code:
cat -A /etc/inittab
to make sure it's a copy paste issue you should not see any ^M

Last edited by Celyr; 09-12-2012 at 06:36 AM.
 
Old 09-12-2012, 07:21 AM   #9
sardinha
Member
 
Registered: Aug 2012
Location: Portugal
Distribution: Slackware, Salix OS
Posts: 51

Original Poster
Rep: Reputation: 10
Thank you for all suggestions, but It was my mistake with default system rc scripts. Sorry! In this case I modified rc.samba, a month ago, changing rc.samba script to run samba4 AD. I don't searched what the default system is doing in reboot process to start and stop samba3, I just believed that using samba4 rc script as rc.samba could simplify, wrong! Because I'm using samba4 for serving an Active Directory, I had to do it in other way. The resolution was revert the samba4 rc script to rc.samba4, then starting rc.samba4 at boot in rc.local, and stop in rc.local_shutdown.

Thank you.
Attached Files
File Type: txt rc.samba4.txt (1.0 KB, 2 views)
File Type: txt rc.local.txt (382 Bytes, 4 views)
File Type: txt rc.local_shutdown.txt (110 Bytes, 1 views)
 
Old 09-12-2012, 09:43 AM   #10
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,014

Rep: Reputation: 146Reputation: 146
Since long ago there were discussions why children rc's should be called
1) with the "sh" prefix such as "sh /etc/rc.d/rc.wicd start"
2) with a "." prefix

Has there been any conlusions apart from the negligible performance gain by 2)?

I believe 2) easily messes things up, while 1) just stores one piece of information twice in two places (the command line in the caller and the shebang of the callee).
 
Old 09-12-2012, 12:36 PM   #11
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,042

Rep: Reputation: 761Reputation: 761Reputation: 761Reputation: 761Reputation: 761Reputation: 761Reputation: 761
You only need to do the sh shell_prog_name if shell_prog_name is not executable; if it is, just type the name and optional argument. You (c|w)ould
Code:
chmod 755 /etc/rc.d/rc.wicd
and problem solved.

What the dot-space prefix does is to execute a shell program in the current environment; the shell does not execute the program in a new PID, it executes in the current PID. What that does is allow you to modify your current environment if desired -- any environment variables set in a dot-space execution will remain set in the current environment.

Just for grins, the "rc" comes from DEC days (like the PDP line), means "run command." The boyos at Bell Labs built Unix on DEC PDP's and, gee, wonder why the used rc, eh?

Hope this helps some.
 
Old 09-12-2012, 03:19 PM   #12
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,014

Rep: Reputation: 146Reputation: 146
Quote:
Originally Posted by tronayne View Post
...

Hope this helps some.
Sorry I meant to ask why they are there and not what they are.
 
  


Reply

Tags
halt, rebooting, slackware -current


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
[SOLVED] Video driver problems and reboot command hangs -current on older system damgar Slackware - Installation 4 07-18-2012 07:00 PM
command to reboot system at specific time sanjay87 Linux - Server 2 11-15-2011 07:47 AM
Linux system powers down when the reboot command is issued. john.wythe@activant.com Linux - Hardware 2 01-04-2011 07:25 PM
Slackware 13 -> Current ,Kernel Panic On Reboot jodef Slackware 9 05-21-2010 08:20 AM
Command or grep to know system reboot time rockcharles1 Linux - General 2 10-05-2007 03:49 PM


All times are GMT -5. The time now is 03:32 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration