Carl Johnson on 15 Jan 2014 12:56:24 -0800


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

Re: [PLUG] debugging an init script


Yep. That's the one that's causing indigestion for me. I've gotten as far as this..... it seems that the script runs but doesn't see, or generate a PID. Not sure which is the case at this moment. Either way, when that happens; exit code 1 = [FAILED]


On Wed, Jan 15, 2014 at 2:42 PM, Chris Heerschap <ChrisMH@aweber.com> wrote:
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

___________________________________________________________________________
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