2 Replies Latest reply on Apr 18, 2012 3:23 PM by Robert Stinnett

    Converting sudo tar installs to Bladelogic Format

    Robert Stinnett

      I have a script I am converting over to Bladelogic but have hit a snag.  I have a section that looks like this:

       

      export PATH=$PATH:$JAVA_HOME/bin

      sudo -u hyperic tar --directory /apps/hyperic/agent --strip-components 1 -xzf /apps/tmp/hyperic-hqee-agent-4.6.0.1-x86-64-linux.tar.gz

      sudo -u tcserver tar --directory /apps/tcserver --strip-components 1 -xvf /apps/tmp/vfabric-tc-server-standard-2.6.1.RELEASE.tar.gz

      sudo -E -u tcserver /apps/tcserver/tcruntime-instance.sh create qv1 -p base.runtime.user=tcserver -p bio.http.port=8080 -p base.jmx.port=8081 -p base.shutdown.port=-1 -i /ap

       

      I just created a straight external command to run this snippet and am getting an error about tty and sudo (see log file below).  Any advice on getting around this or an alternative means to do what I am attempting above?  I'm relatively new to BL so excuse me if this is a newbie question!

       

      Thanks,

      Robert

       

       

      04/17/12 16:41:31.031 DEBUG    bldeploy - [18][Install It] chdir to PkgDir: '/var/tmp/stage/30b3af87c7a036e18c4e2ffb6a14fcdb/'

      04/17/12 16:41:31.039 WARN     bldeploy - [18][Install It] [stderr: 18]         sudo:

      04/17/12 16:41:31.039 WARN     bldeploy - [18][Install It] [stderr: 18]         sorry, you must have a tty to run sudo

      04/17/12 16:41:31.039 WARN     bldeploy - [18][Install It] [stderr: 18]

       

      04/17/12 16:41:31.057 WARN     bldeploy - [18][Install It] [stderr: 18]         sudo:

      04/17/12 16:41:31.057 WARN     bldeploy - [18][Install It] [stderr: 18]         sorry, you must have a tty to run sudo

      04/17/12 16:41:31.057 WARN     bldeploy - [18][Install It] [stderr: 18]

       

      04/17/12 16:41:31.061 WARN     bldeploy - [18][Install It] [stderr: 18]         sudo:

      04/17/12 16:41:31.061 WARN     bldeploy - [18][Install It] [stderr: 18]         sorry, you must have a tty to run sudo

      04/17/12 16:41:31.061 WARN     bldeploy - [18][Install It] [stderr: 18]