Re: [opensuse] Reboot via SSH
- From: Tejas Guruswamy <tejas.guruswamy@xxxxxxxxxxxx>
- Date: Wed, 10 Aug 2011 07:47:45 +0100
On 10/08/11 02:01, Brian K. White wrote:
On 8/9/2011 3:04 AM, Carl Hartung wrote:On Tue, 9 Aug 2011 00:30:34 -0600
Carlos Frederico Lange<carlosflange@xxxxxxxxx> wrote:
On Mon, Aug 8, 2011 at 6:19 PM, Marc Chamberlin
<marc@xxxxxxxxxxxxxxxxxx> wrote:
I ssh'd into my home system as root without any problems. But when
I give the command to reboot, nothing happens.. "shutdown -r now"
also just gives a response saying the system is going down, but
again it does not actually reboot!
Just tested from my desktop to my laptop and the command "reboot"
works fine. Have you looked at the log files? "/var/log/messages" for
example. To see which log files were written most recently run "ls
-lrt".
Interesting ...
On my 11.4 system "reboot" is symlinked to /sbin/halt:
linux:/sbin # ls -al reboot
lrwxrwxrwx 1 root root 4 Jul 13 04:38 reboot -> halt
In any case, I learned several years ago with SuSE to use the init
system for ad hoc run level selections because it is tightly integrated
into the distribution. For example, 'init 0' gracefully brings the
system down and powers it off. 'init 6' does the same thing except the
system is restarted (will boot to the default run level.) 'init 1'
boots/drops to single user mode for certain maintenance items. 'init 2'
gives you multiuser mode without networking. I'm sure you're already
familiar with 'init 3' (run level 3) and 'init 5' (run level 5)
I only ever use "shutdown", ie, "shutdown -r now" and don't have any problem. I believe that is the defined "most correct, most graceful" way in the manual even though several others should usually work well enough. This is true for most os's although the syntax of the command itself changes from os to os.
Recently I noticed an employee had been using "reboot", which I never use because on SCO Unix "halt" and "reboot" are lower level and not very graceful, but it seems to be ok on Suse. You're not even supposed to call init directly on sco, technically you're supposed to use "telinit", when for whatever reason you're not using "shutdown" like you're really supposed to. And the meanings of runlevels aren't necessarily written in stone either. They're written in /etc/inittab which anyone may edit. "init 6" could theoretically not actually mean reboot, but "shutdown -r" always will. Definitely the meaning of "Full multi-user, with networking, without X" is different between some os's. It's init 3 for linux but init 2 for sco unix.
Has noone read the manpages?
man halt:
" If halt or reboot is called when the system is not in runlevel 0 or 6, in other words when it's running normally, shutdown will be invoked instead
(with the -h or -r flag). For more info see the shutdown(8) manpage.
"
and furthermore:
man shutdown:
"
shutdown does its job by signalling the init process, asking it to change the runlevel. Runlevel 0 is used to halt the system, runlevel 6 is used to
reboot the system, and runlevel 1 is used to put to system into a state where administrative tasks can be performed; this is the default if neither
the -h or -r flag is given to shutdown.
"
So everyone arguing about the best way to shutdown/reboot is actually doing the EXACT SAME THING.
Regards,
Tejas
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
- Follow-Ups:
- Re: [opensuse] Reboot via SSH
- From: Dave Howorth
- Re: [opensuse] Reboot via SSH
- From: Carl Hartung
- Re: [opensuse] Reboot via SSH
- References:
- [opensuse] Reboot via SSH
- From: Marc Chamberlin
- Re: [opensuse] Reboot via SSH
- From: Carlos Frederico Lange
- Re: [opensuse] Reboot via SSH
- From: Carl Hartung
- Re: [opensuse] Reboot via SSH
- From: Brian K. White
- [opensuse] Reboot via SSH
- Prev by Date: Re: [opensuse] How to add a descriptive icon to Scribus [SOLVED]
- Next by Date: Re: [opensuse] libreoffice prints wrong fonts
- Previous by thread: Re: [opensuse] Reboot via SSH
- Next by thread: Re: [opensuse] Reboot via SSH
- Index(es):
Relevant Pages
|