public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Uwe Thiem <uwix@iway.na>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] debugging init scripts
Date: Thu, 12 Jul 2007 17:15:40 +0100	[thread overview]
Message-ID: <200707121715.40746.uwix@iway.na> (raw)
In-Reply-To: <13b70780707120832h3c8200eelc88b644fe9b4f9af@mail.gmail.com>

On 12 July 2007, Frank Wilson wrote:
> I'm trying to debug an init script / daemon I'm trying to run. I can't
> seem to print the  debug output to print to a file. For example I
> enter:
>
> /etc/init.d/apache2 restart --debug >> /root/apache2.debug
>
> or
>
> /etc/init.d/apache2 restart --debug > /root/apache2.debug
>
> but I get none of the debug output. Also less insists that
> /root/apache2.debug is a binary file... not sure why.

First of all, you should do something like "/etc/init.d/apache2 
restart --debug > /root/apache2.debug 2>&1" to catch both, standard and error 
output.

Still, this won't work in your case. The output you usually see on screen, is 
*not* generated by the script (or the executing shell) but by the commands 
used in the script.

So keep a backup of the original script, then dive into it with your favourite 
editor and append ">> /root/apache2.debug 2>&1" to all relevant commands.

Uwe

-- 
Jethro Tull: Maybe, I am not done yet!
-- 
gentoo-user@gentoo.org mailing list



  reply	other threads:[~2007-07-12 16:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-12 15:32 [gentoo-user] debugging init scripts Frank Wilson
2007-07-12 16:15 ` Uwe Thiem [this message]
2007-07-12 17:06   ` Thomas Tuttle
2007-07-16  0:07     ` Iain Buchanan
2007-07-16  1:13       ` Ian Hastie
2007-07-16  1:58         ` Iain Buchanan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200707121715.40746.uwix@iway.na \
    --to=uwix@iway.na \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox