| 查看: 1252 | 回复: 5 | ||
| 当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖 | ||
迷路的游侠木虫 (正式写手)
|
[求助]
求助ubuntu下maui的安装配置
|
|
|
这是maui.d的一部分文件: # Source the library functions . /etc/rc.d/init.d/redhat_functions MAUI_PREFIX=/usr/local/maui # let see how we were called case "$1" in start) echo -n "Starting MAUI Scheduler: " daemon $MAUI_PREFIX/sbin/maui echo ;; stop) echo -n "Shutting down MAUI Scheduler: " killproc maui 。。。。。。 ================================================= 而这些start、stop函数是根据redhat的function写的 一下是redhat的functions一部分: # A function to start a program. daemon() { # Test syntax. local gotbase= force= nicelevel corelimit local pid base= user= nice= bg= pid_file= local cgroup= nicelevel=0 while [ "$1" != "${1##[-+]}" ]; do case $1 in '') echo $"$0: Usage: daemon [+/-nicelevel] {program}" return 1;; --check) base=$2 gotbase="yes" shift 2 ;; --check=?*) base=${1#--check=} gotbase="yes" shift ;; --user) user=$2 shift 2 ;; --user=?*) user=${1#--user=} shift ;; --pidfile) pid_file=$2 shift 2 ;; --pidfile=?*) pid_file=${1#--pidfile=} shift ;; --force) force="force" shift ;; [-+][0-9]*) nice="nice -n $1" shift ;; =============================================== 而ubuntu的function是这样写的: start_daemon () { #SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR #BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, #WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE #OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, #EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. start_daemon () { local force nice pidfile exec i args force=0 nice=0 pidfile=/dev/null OPTIND=1 while getopts fn:p: opt ; do case "$opt" in f) force=1;; n) nice="$OPTARG";; p) pidfile="$OPTARG";; esac done shift $(($OPTIND - 1)) if [ "$1" = '--' ]; then shift fi exec="$1"; shift args="--start --nicelevel $nice --quiet --oknodo" if [ $force = 1 ]; then /sbin/start-stop-daemon $args --chdir "$PWD" --startas $exec --pidfile /dev/null -- "$@" elif [ $pidfile ]; then /sbin/start-stop-daemon $args --chdir "$PWD" --exec $exec --oknodo --pidfile "$pidfile" -- "$@" else /sbin/start-stop-daemon $args --chdir "$PWD" --exec $exec -- "$@" fi } pidofproc () { local pidfile line i pids= status specified pid pidfile= specified= OPTIND=1 while getopts p: opt ; do case "$opt" in p) pidfile="$OPTARG"; specified=1;; esac done shift $(($OPTIND - 1)) base=${1##*/} if [ ! "$specified" ]; then pidfile="/var/run/$base.pid" fi if [ -n "${pidfile:-}" -a -r "$pidfile" ]; then read pid < "$pidfile" if [ -n "${pid:-}" ]; then if $(kill -0 "${pid:-}" 2> /dev/null); then echo "$pid" return 0 elif ps "${pid:-}" >/dev/null 2>&1; then echo "$pid" return 0 # program is running, but not owned by this user else return 1 # program is dead and /var/run pid file exists fi fi fi if [ -x /bin/pidof -a ! "$specified" ]; then status="0" /bin/pidof -o %PPID -x $1 || status="$?" if [ "$status" = 1 ]; then return 3 # program is not running fi return 0 fi return 4 # Unable to determine status } # start-stop-daemon uses the same algorithm as "pidofproc" above. /bin/pidof -o %PPID -x $1 || status="$?" if [ "$status" = 1 ]; then return 3 # program is not running fi return 0 fi return 4 # Unable to determine status } =================================================== 这样我执行start的时候就启动不了了,求高手给出个主意解决一下,别说让我装回redhat。。。。。。 |
» 猜你喜欢
Cas 72-43-5需要30g,定制合成,能接单的留言
已经有7人回复
磺酰氟产物,毕不了业了!
已经有5人回复
北京211副教授,35岁,想重新出发,去国外做博后,怎么样?
已经有5人回复
论文终于录用啦!满足毕业条件了
已经有25人回复
2026年机械制造与材料应用国际会议 (ICMMMA 2026)
已经有3人回复
自荐读博
已经有3人回复
求助:我三月中下旬出站,青基依托单位怎么办?
已经有5人回复
不自信的我
已经有5人回复
投稿Elsevier的杂志(返修),总是在选择OA和subscription界面被踢皮球
已经有8人回复
» 本主题相关价值贴推荐,对您同样有帮助:
有在ubuntu下安装materials studio 成功的么?
已经有11人回复
【原创】CPMD3.15.1 和3.13.2在Ubuntu下的自动下载,安装,测试脚本 (Gfortran)
已经有12人回复
【求助成功】求ubuntu中vasp程序安装最后一步出错!!郁闷!!!
已经有12人回复
【求助】如何进行Ubuntu下fortran开发的环境配置
已经有3人回复
ubuntu下的办公软件
已经有6人回复
【求助】在ubuntu下安装ms 4.2失败
已经有35人回复
迷路的游侠
木虫 (正式写手)
- 应助: 3 (幼儿园)
- 金币: 3602.9
- 散金: 351
- 帖子: 387
- 在线: 272小时
- 虫号: 747246
- 注册: 2009-04-13
- 性别: GG
- 专业: 半导体材料
3楼2011-09-01 12:04:16
迷路的游侠
木虫 (正式写手)
- 应助: 3 (幼儿园)
- 金币: 3602.9
- 散金: 351
- 帖子: 387
- 在线: 272小时
- 虫号: 747246
- 注册: 2009-04-13
- 性别: GG
- 专业: 半导体材料
5楼2011-09-01 12:45:02









回复此楼