Carl Johnson on 21 Jan 2014 10:09:16 -0800 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PLUG] debugging an init script |
Quick update here....# prevent inheriting this setting to VBoxSVC
unset VBOX_RELEASE_LOG_DEST
start_daemon $VBOXWEB_USER $binary $PARAMS > /dev/null 2>&1
# ugly: wait until the final process has forkedsleep .1this points to the problem. the script waits for "vbox /usr/lib/virtualbox/vboxwebsrv --background -F /var/log/vboxweb.log"
to fork into the background, but it never does. as soon as the following command "sleep .1" completes, the entire script quits with [FAILED].I guess i'm off to a bug report over @ virtualbox. I'm open to any workarounds/hacks/mods from anyone to band-aid this 'till it's fixed.
On Wed, Jan 15, 2014 at 4:02 PM, JP Vossen <jp@jpsdomain.org> wrote:
On 01/15/2014 11:49 AM, Andrew Libby wrote:
Hi Carl,
You can probably do something like
/bin/bash -x /etc/init.d/servicescriptname {start|stop}
+1 for that, though all the ideas have been good.
You may also want to play with $PS4 which is the prompt for the -x debug output.
Possibly overkill example (and this looks like negative line numbers when not in a function):
export PS4+xtrace $BASH_SOURCE::$FUNCNAME-$LINENO:= '
NOTE that the first character is duplicated to indicate nesting level, so make sure it's something that makes sense, like "+".
Lots more here: http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/
Later,
JP
----------------------------|:::======|-------------------------------
JP Vossen, CISSP |:::======| http://bashcookbook.com/
My Account, My Opinions |=========| http://www.jpsdomain.org/
----------------------------|=========|-------------------------------
"Microsoft Tax" = the additional hardware & yearly fees for the add-on
software required to protect Windows from its own poorly designed and
implemented self, while the overhead incidentally flattens Moore's Law.
___________________________________________________________________________
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