image
image

Go Back   macosx.com > Mac Help Forums > HOWTO & FAQs

Reply
 
Thread Tools
  #9  
Old December 4th, 2002, 11:06 AM
Registered User
 
Join Date: Dec 2001
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
alligatorTim is on a distinguished road
huh. that might be good info to find ..

as for the reboot/shutdown ... i'm not sure about os x, but in other bsd's (freeBSD, openBSD) if you try a "reboot -n" it will shut down your computer without unmounting the drives, and then you have to mount them again from single user (total pain in the culo) before it will boot again. so i stick to using shutdown .. i mean it's not that much more typing.
Reply With Quote
  #10  
Old December 18th, 2002, 10:22 PM
~departed~
 
Join Date: Jul 2002
Location: Kansas City, MO
Posts: 457
Thanks: 0
Thanked 0 Times in 0 Posts
gatorparrots is on a distinguished road
Shutdown Commands
This will shut down your system in five minutes:
sudo shutdown +5

This will reboot your system in five minutes:
sudo shutdown -r +5

This will reboot your system now:
sudo shutdown -r now
or
sudo reboot

This will reboot your system in five minutes and pass on a warning message to all logged in shell users and then reboot into OS 9:
sudo shutdown -r +5 'need Mac OS 9' ; bless -folder9 '/System Folder' -setOF

Last edited by gatorparrots; December 18th, 2002 at 11:27 PM.
Reply With Quote
  #11  
Old December 18th, 2002, 11:20 PM
~departed~
 
Join Date: Jul 2002
Location: Kansas City, MO
Posts: 457
Thanks: 0
Thanked 0 Times in 0 Posts
gatorparrots is on a distinguished road
Two more possibilities

Two other options
You can also restart individual daemons with this syntax:
sudo kill -HUP `cat /var/run/lookupd.pid`
(This example shows how to restart lookupd.)
This type of command will work for any of the processes listed in /var/run/:
Code:
AppleFileServer.pid
autodiskmount.pid
automount.pid
configd.pid
cron.pid
davlocks
httpd.pid
inetd.pid
lookupd.pid
mDNSResponder.pid
netinfo_local.pid
ntpd.pid
sshd.pid
syslog.pid
xinetd.pid
Also, /System/Library/SystemConfiguration/Kicker.bundle/Resources/ contains graceful methods for restarting the listed services. They are largely just "nicer" versions of a sudo kill -HUP `cat /var/run/whatever.pid`. Still, they are more elegant and have better error handling routines, so it may be the preferred methodology for restarting those processes in the list.
Code:
/System/Library/SystemConfiguration/Kicker.bundle/Resources/
total 32k
drwxr-xr-x   10 root     wheel         340 Jul 27 01:39 .
drwxr-xr-x    4 root     wheel         136 Jul 27 01:39 ..
-rw-r--r--    1 root     wheel         787 Jul 17 21:30 Info-macos.plist
-rw-r--r--    1 root     wheel        2.2k Jul 11 19:07 Kicker.xml
-rwxr-xr-x    1 root     wheel         503 Jun 25 20:39 enable-network

-rwxr-xr-x    1 root     wheel        2.7k May 12  2002 restart-AppleTalk

-rwxr-xr-x    1 root     wheel        2.3k Feb 22  2002 restart-NetInfo

-rwxr-xr-x    1 root     wheel         725 Mar 29  2001 restart-lookupd

-rwxr-xr-x    1 root     wheel        1.1k Jul 17 17:32 set-hostname
-rw-r--r--    1 root     wheel         429 Jul 27 01:39 version.plist
SystemStarter is an alternative method for restarting specific processes, but can be used for a blanket restart command. (Your mileage may vary however, on whether the daemons will respond well or at all to the restart command.) One very good use for SystemStarter: it is handy for testing StartupItems or is an option for those whose uptime is the paramount concern [servers or otherwise]. Like any tool, it has its place and time for use.
Reply With Quote
  #12  
Old January 10th, 2003, 06:46 PM
Jasoco's Avatar
Video Gamer/Collector
 
Join Date: Jun 2001
Location: Doylestown PA
Posts: 499
Thanks: 0
Thanked 0 Times in 0 Posts
Jasoco is on a distinguished road
Quote:
Originally posted by gatorparrots
Shutdown Commands
This will shut down your system in five minutes:
sudo shutdown +5

This will reboot your system in five minutes:
sudo shutdown -r +5

This will reboot your system now:
sudo shutdown -r now
or
sudo reboot

This will reboot your system in five minutes and pass on a warning message to all logged in shell users and then reboot into OS 9:
sudo shutdown -r +5 'need Mac OS 9' ; bless -folder9 '/System Folder' -setOF
So, if you make them negative numbers, will the computer shut down or reboot 5 minutes ago?
__________________
Confucious Say: Jasoco, change your gosh darn SIGNATURE! it's been like that forever!
Never disobey Confucious.

Jasoco.net - GeekPub Forums
Reply With Quote
Reply

Thread Tools

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 10:30 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.