24小时热门版块排行榜    

查看: 1503  |  回复: 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。。。。。。
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

迷路的游侠

木虫 (正式写手)

引用回帖:
4楼: Originally posted by bingmou at 2011-09-01 12:32:10:
这个应该是系统的配置文件布局不同导致的,debian体系和redhat有些东西是不能互用的。我记得debian下面就是没有rc.d的,而是直接的rc0.d,rc1.d....
所以,你要弄懂为什么maui需要redhat的那个functions和这个fun ...

嗯 就是这个伤脑筋啊 关键是我对语言一窍不通,直接copy也试过了不行,torque倒是没问题能用。所以希望能有这方面的高手帮我看看maui.d的配置start/stop/restart/status配置要怎么写
5楼2011-09-01 12:45:02
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 6 个回答

bingmou

金虫 (著名写手)

【答案】应助回帖


youzhizhe(金币+1): 谢谢交流。 2011-09-01 11:32:36
迷路的游侠(金币+1): 2011-09-06 20:11:18
首先,这是什么东西?
其次,出现了什么错误提示?
最后,你想要什么?
2楼2011-09-01 11:23:23
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

迷路的游侠

木虫 (正式写手)

引用回帖:
2楼: Originally posted by bingmou at 2011-09-01 11:23:23:
首先,这是什么东西?
其次,出现了什么错误提示?
最后,你想要什么?

这是linux下的队列管理的软件,我想用torque和maui管理我的计算任务的队列啊
关于错误提示ubuntu下是没有rc.d文件夹的,所以原来的错误是找不到/etc/rc.d/init.d/functions,后来我把ubuntu下的/lib.lsb/linit_functions ln过去后就是提示daemon not found ,我把它改成ubuntu下的start_daemon后,就没反应了,但也启动不了。直接把redhat系统的functions copy过来也不能用,我现在的问题就是装完这个软件后没法用它!
3楼2011-09-01 12:04:16
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

bingmou

金虫 (著名写手)

【答案】应助回帖

★ ★
youzhizhe(金币+2): 谢谢交流。 2011-09-01 19:03:53
迷路的游侠(金币+5): 2011-09-06 20:10:58
这个应该是系统的配置文件布局不同导致的,debian体系和redhat有些东西是不能互用的。我记得debian下面就是没有rc.d的,而是直接的rc0.d,rc1.d....
所以,你要弄懂为什么maui需要redhat的那个functions和这个functions里面有哪些是naui需要的,试试自己在ubuntu里面找到这些functions,或者直接copy过来。
或者你直接apt-get install torque试试
4楼2011-09-01 12:32:10
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 为什么国自然不能直接公布 +3 bjdxyxy 2026-08-26 3/150 2026-08-26 12:48 by 小丑鱼爱读书
[基金申请] 哪位高人中了,把查询到的截图贴出来让我看看,让我长长见识 +3 yuleib84 2026-08-26 3/150 2026-08-26 12:34 by xiacongxu
[基金申请] 系统查不到 +9 董八千 2026-08-26 9/450 2026-08-26 12:30 by yanmofang
[基金申请] 国合里面能看到了 +7 一怀馨秋 2026-08-26 7/350 2026-08-26 11:23 by zhaosm1982
[基金申请] 国际合作可查了,中了面上 +18 Ldrop2023 2026-08-26 18/900 2026-08-26 11:15 by cmrandy
[基金申请] 系统进不去 +4 yanglien 2026-08-26 5/250 2026-08-26 11:10 by wenfengw83
[基金申请] 2026年的国家社科基金项目通讯评审的新规则与新动向、新挑战 +6 process2012 2026-08-23 8/400 2026-08-26 11:03 by zjlp
[基金申请] 国合可查了 +3 paperzjh 2026-08-26 3/150 2026-08-26 10:41 by LemmonTr
[基金申请] 出来了 +8 trojank 2026-08-26 8/400 2026-08-26 09:00 by gxc
[基金申请] 2026年8月25日国自然放榜前突然收到列入评审专家邮件,有关系吗? +24 木水思豆 2026-08-25 27/1350 2026-08-26 08:26 by yanchen918
[基金申请] 在坚冰还盖着北海的时候,我看到了怒放的梅花。 (金币+10) +6 ziyangfang 2026-08-25 9/450 2026-08-25 20:26 by huagongfeihu
[基金申请] 明天应该可查了!? +6 chengyan1220 2026-08-23 6/300 2026-08-25 19:45 by zfd97
[基金申请] 有没有大神帮我看看基金代码 28+4 1234567wang 2026-08-24 10/500 2026-08-25 19:15 by lfy8008
[基金申请] 放榜前的不淡定 20+4 snowwithsea 2026-08-19 19/950 2026-08-25 17:57 by chick875
[基金申请] 某些机构,以效率低为荣,以效率低作为存在感 +9 yuleib84 2026-08-25 10/500 2026-08-25 17:14 by alexon
[基金申请] 今日不放榜?网传国自然预计 8 月 27 日可查结果 +17 医学老男孩 2026-08-20 22/1100 2026-08-25 15:36 by 医学老男孩
[基金申请] 如果此刻你正在为国基感到焦虑,不妨来听听这首《基金之外》 +8 scalable 2026-08-24 8/400 2026-08-25 12:52 by jnhyjjm
[基金申请] 人气不行了 +11 fansofjerry 2026-08-21 11/550 2026-08-25 11:04 by 孤独的英雄6
[基金申请] 建议基金发布提前给出明确的时间点 +13 kulium 2026-08-21 16/800 2026-08-24 16:27 by superceng
[基金申请] 时间戳今天,20号变了 +5 archvillain 2026-08-20 5/250 2026-08-22 06:12 by hui_daxiao
信息提示
请填处理意见