Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-4015

init.d script, +$JBOSS_OPTIONS, jboss-as/bin/init.d/jboss-as-standalone.sh tests for *executable* /etc/rc.d/init.d/functions

    XMLWordPrintable

Details

    Description

      1. The supplied jboss init script shall accept options for jboss. Proposal: $JBOSS_OPTIONS. This is usefull to hand over the binding. (My JBoss is in a VM on DHCP and I don't want to/can't bind to 0.0.0.0).

      2. Bug: On CentOS 6 (and maybe other Distros too), the /etc/rc.d/init.d/functions has no executable flag set. The jboss init.d script itself sources it with ". /etc/rc.d/init.d/functions"

      ll /etc/rc.d/init.d/functions
      -rw-r--r--. 1 root root 18171 Oct  7 16:01 /etc/rc.d/init.d/functions
      

      Proposed patch:

      patch for $JBOSS_HOME/bin/init.d/jboss-as-standalone.sh
      # diff  /opt/jboss-as/bin/init.d/jboss-as-standalone.sh /etc/init.d/jboss
      
      60c60
      <   if [ -x /etc/rc.d/init.d/functions ]; then
      ---
      >   if [ -r /etc/rc.d/init.d/functions ]; then
      89,90c89,90
      <     if [ -x /etc/rc.d/init.d/functions ]; then
      <       daemon --user $JBOSS_USER LAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=$JBOSS_PIDFILE $JBOSS_SCRIPT -c $JBOSS_CONFIG 2>&1 > $JBOSS_CONSOLE_LOG &
      ---
      >     if [ -r /etc/rc.d/init.d/functions ]; then
      >       daemon --user $JBOSS_USER LAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=$JBOSS_PIDFILE $JBOSS_SCRIPT $JBOSS_OPTIONS -c $JBOSS_CONFIG 2>&1 > $JBOSS_CONSOLE_LOG &
      92c92
      <       su - $JBOSS_USER -c "LAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=$JBOSS_PIDFILE $JBOSS_SCRIPT -c $JBOSS_CONFIG" 2>&1 > $JBOSS_CONSOLE_LOG &
      ---
      >       su - $JBOSS_USER -c "LAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=$JBOSS_PIDFILE $JBOSS_SCRIPT $JBOSS_OPTIONS -c $JBOSS_CONFIG" 2>&1 > $JBOSS_CONSOLE_LOG &
      

      Attachments

        Issue Links

          Activity

            People

              fharms_jira Flemming Harms (Inactive)
              djabba74 Leo Breuss (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: