Chris Heerschap on 15 Jan 2014 11:42:22 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] debugging an init script


On 1/15/14 2:29 PM, Rich Freeman wrote:
On Wed, Jan 15, 2014 at 11:55 AM, Carl Johnson
<cjohnson19791979@gmail.com> wrote:
I'll try that. They're not going with upstart until v7 from what I've read.

Wait, RedHat is going with Upstart?  That seems a bit odd considering
they invented SystemD...

Yeah, to the best of my knowledge they're going with systemd, not upstart. I'm finally getting used to it and not abjectly hating it on Fedora.

Since the /etc/init.d/ scripts are usually just written in bash, you can add this to the start of the script (after the #! line)

exec 2> /tmp/debug
set -x debug

That'll give you pretty detailed debugging output as well as any STDERR directed to the named debug file. This is basically the same output as running bash -x /etc/init.d/script (mentioned previously, which doesn't require modifying the script)

You mentioned it's the "vboxweb" script - do you mean vboxweb-service? Looking on my Fedora system, I don't see the former, but do see the latter. It's a pretty big file, not the typical simple ones. Could be tough finding out where it's failing if it's not giving output.


cmh


___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug