开发者

problem while executing script files in linux

开发者_如何学运维I am trying to create installer for our application using izpack, i am facing problem while executing script file in linux.I am able to run bat files through process panel. please reply


This question would be more easier to answer if you provide a little bit more info here ...

Blind guessing I would say that you need to make sure that the executable bits are preserved on your linux shell scripts using the executable tag like shown below:

<pack name="Tomcat 6 Application Server" required="yes" packImgId="Tomcat.image">
  <description>The Tomcat 6.0 Web Application Server.</description>
  <fileset dir="windows/apache-tomcat-6.0.32" targetdir="$INSTALL_PATH">
    <os family="windows" />
  </fileset>
  <fileset dir="linux/apache-tomcat-6.0.32" targetdir="$INSTALL_PATH">
    <os family="unix" />
  </fileset>

  <parsable targetfile="$INSTALL_PATH/conf/server.xml" type="xml" />
  <parsable targetfile="$INSTALL_PATH/conf/tomcat-users.xml" type="javaprop" />
  <parsable targetfile="$INSTALL_PATH/bin/catalina.bat" type="plain" />
  <parsable targetfile="$INSTALL_PATH/bin/catalina.sh" type="plain" />
  <executable targetfile="$INSTALL_PATH/bin/catalina.sh" keep="true" stage="never" />
  <executable targetfile="$INSTALL_PATH/bin/startup.sh" keep="true" stage="never" />
  <executable targetfile="$INSTALL_PATH/bin/shutdown.sh" keep="true" stage="never" />
  <executable targetfile="$INSTALL_PATH/bin/digest.sh" keep="true" stage="never" />
  <executable targetfile="$INSTALL_PATH/bin/setclasspath.sh" keep="true" stage="never" />
  <executable targetfile="$INSTALL_PATH/bin/tool-wrapper.sh" keep="true" stage="never" />
  <executable targetfile="$INSTALL_PATH/bin/version.sh" keep="true" stage="never" />
</pack>


You can use <executable> tags in your pack definitions to specify which files are executables. The key is to have stage="never" attribute so izpack does not execute the file and to set keep="true" so izpack does not remove it.

For example:

<executable targetfile="$INSTALL_PATH/bin/some-secript"
                 os="unix" stage="never" failure="warn" keep="true"/>

documentation

[izpack-user] Setting file-permissions in Linux

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜