This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Attached is a patch to setup that redirects the output of postinstall
scripts to a file (/var/log/setup.log.postinstall), bracketing it with
timestamped "Running <scriptname>" and "Done <scriptname>".
It's currently not tied into the logging mechanism, and it only redirects
the postinstall scripts (as compared to preremove and postremove), but
both are reasonably easy to add building on this patch.
The patch was tested on Win2k SP2 and Win98 (the two systems I have access
to). In particular, I did a clean install on the Win98 machine, and the
output from all .sh and .bat postinstall scripts went into a (newly
created) /var/log/setup.log.postinstall.
Igor
ChangeLog:
2002-10-17 Igor Pechtchanski <pechtcha@cs.nyu.edu>
* script.cc (run): Add lname parameter.
Redirect output of subprocess to file, creating the
path if necessary.
(run_script): Add optional lname parameter.
(get_now_string): New function.
(prepareOutputLog): New function.
(closeOutputLog): New function.
(log_failure_notified): New static variable.
* script.h (run_script): Add optional lname parameter.
* postinstall.cc (RunFindVisitor::visitFile): Pass
filename to run_script().
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"Water molecules expand as they grow warmer" (C) Popular Science, Oct'02, p.51
Attachment:
setup-postinstall-log.patch
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |