The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > OS X (Apple)
.
google unix.com



OS X (Apple) OS X is a line of Unix-based graphical operating systems developed, marketed, and sold by Apple.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Show file to new format almanto Shell Programming and Scripting 1 12-11-2008 05:15 PM
Show file to new format almanto Shell Programming and Scripting 5 12-11-2008 05:14 PM
new NIC card doesn't show in show-nets iperez SUN Solaris 13 09-26-2008 04:52 AM
WRT counter show me that line from a txt file user_prady High Level Programming 6 02-07-2008 02:20 AM
Need ls to show number of lines in each file GMMike UNIX for Dummies Questions & Answers 1 11-19-2004 05:53 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-08-2009
glev2005 glev2005 is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 74
Log file to show if loginhook has run or not

Which log file lists the activity of startup scripts, particularly loginhooks? I am trying hard to find it and I cannot. How can I even tell if my script is running without errors if there isnt a log? Very frusturating!
  #2 (permalink)  
Old 10-14-2009
[MA]Flying_Meat [MA]Flying_Meat is offline
Registered User
  
 

Join Date: Sep 2002
Location: San Fran
Posts: 130
It is up to you to use whatever log file you want to return success and/or failure information.

In your LoginHook, use the "logger" command to send the status to /var/log/system.log

You could start your script with a simple "running LoginHook" to determine if the hook is actually getting called successfully. Then you can test for success or failure of the various operations in the LoginHook script by testing $? after each, and report based on that.

So:
logger -p local0.notice "LoginHook: LoginHook started at "`date`

at the beginning of your LoginHook would indicate it started nicely.

Entering additional LoginHook task success or failure really helps troubleshooting, so
logger -p local0.notice "LoginHook: yourcommandhere OK/failed "`date`

man logger
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:59 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0