![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
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!
|
|
||||
|
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 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|