系统级脚本 rpcbind
[root@web02 ~]# vim /etc/init.d/rpcbind
#! /bin/sh
#
# rpcbind Start/Stop RPCbind
#
# chkconfig: 2345 13 87
# description: The rpcbind utility is a server that converts RPC pr
ogram \
# numbers into universal addresses. It must be running
on the \
# host to be able to make RPC calls on a server on tha
t machine.
#
# processname: rpcbind
# probe: true
# config: /etc/sysconfig/rpcbind # This is an interactive program, we need the current locale
[ -f /etc/profile.d/lang.sh ] && . /etc/profile.d/lang.sh
# We can't Japanese on normal console at boot time, so force LANG=C
.
if [ "$LANG" = "ja" -o "$LANG" = "ja_JP.eucJP" ]; then
if [ "$TERM" = "linux" ] ; then
LANG=C
fi
fi
"/etc/init.d/rpcbind" 107L, 2073C 1,1 Top
#! /bin/sh
#
# rpcbind Start/Stop RPCbind
#
# chkconfig: 2345 13 87
# description: The rpcbind utility is a server that converts RPC program \
# numbers into universal addresses. It must be running on the \
# host to be able to make RPC calls on a server on that machine.
#
# processname: rpcbind
# probe: true
# config: /etc/sysconfig/rpcbind # This is an interactive program, we need the current locale
[ -f /etc/profile.d/lang.sh ] && . /etc/profile.d/lang.sh
# We can't Japanese on normal console at boot time, so force LANG=C.
if [ "$LANG" = "ja" -o "$LANG" = "ja_JP.eucJP" ]; then
if [ "$TERM" = "linux" ] ; then
LANG=C
fi
fi # Source function library.
. /etc/init.d/functions # Source networking configuration.
[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network prog="rpcbind"
[ -f /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog RETVAL=0
uid=`id | cut -d\( -f1 | cut -d= -f2` start() {
# Check that networking is up.
[ "$NETWORKING" = "yes" ] || exit 6 [ -f /sbin/$prog ] || exit 5 # Make sure the rpcbind is not already running.
if status $prog > /dev/null ; then
exit 0
fi # Only root can start the service
[ $uid -ne 0 ] && exit 4 echo -n $"Starting $prog: "
daemon $prog $1 "$RPCBIND_ARGS"
RETVAL=$?
echo
if [ $RETVAL -eq 0 ] ; then
touch /var/lock/subsys/$prog
[ ! -f /var/run/rpcbind.pid ] &&
/sbin/pidof $prog > /var/run/rpcbind.pid
fi
return $RETVAL
} stop() {
echo -n $"Stopping $prog: "
killproc $prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && {
rm -f /var/lock/subsys/$prog
rm -f /var/run/rpcbind*
}
return $RETVAL
} # See how we were called.
case "$1" in
start)
start
RETVAL=$?
;;
stop)
stop
RETVAL=$?
;;
status)
status $prog
RETVAL=$?
;;
restart | reload| force-reload)
stop
start
RETVAL=$?
;;
condrestart | try-restart)
if [ -f /var/lock/subsys/$prog ]; then
stop
start -w
RETVAL=$?
fi
;;
*)
echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart|try-restart}"
RETVAL=2
;;
esac exit $RETVAL
系统级脚本 rpcbind的更多相关文章
- 系统级性能分析工具perf的介绍与使用
测试环境:Ubuntu16.04(在VMWare虚拟机使用perf top存在无法显示问题) Kernel:3.13.0-32 系统级性能优化通常包括两个阶段:性能剖析(performance pro ...
- 系统级性能分析工具perf的介绍与使用[转]
测试环境:Ubuntu16.04(在VMWare虚拟机使用perf top存在无法显示问题) Kernel:3.13.0-32 系统级性能优化通常包括两个阶段:性能剖析(performance pro ...
- CentOS:设置系统级代理(转)
原文地址:http://www.cnblogs.com/cocowool/archive/2012/07/05/2578487.html YUM代理设置 编辑/etc/yum.conf,在最后加入 # ...
- centos7 系统初始化脚本
现在自己的本地虚拟机系统,直接安装的是centos7.2 mini版,安装完成发现好多东西都没有安装,所以写了一个简单的系统初始化脚本,让自己可以省一些力气,哈哈 人懒主要是. 下面贴出写的脚本,脚本 ...
- 从service弹出系统级自定义提示框,可在任意页面弹出
添加权限 <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> // 显示 ...
- 转 系统级编程语言性能PK
http://www.solidot.org/story?sid=35754 看了此文,为什么我现在如此看好Rust C/C++已经统治系统编程很久,除了ObjectiveC之外语言都无法获得很高的关 ...
- 系统级IO实践学习记录
代码分析 cp1.c 功能:复制文件. #include <stdio.h>#include <stdlib.h>#include <unistd.h>#inclu ...
- 系统级I/O学习记录
重要知识点 输入/输出(I/O) I/O是主存和外部设备(如磁盘驱动器.终端和网络)之间拷贝数据的过程. 输入操作是从I/O设备拷贝数据到主存. 输出操作是从主存拷贝到I/O设备. Unix I/O ...
- 第十章 系统级I/O
第十章 系统级I/O 一.Unix I/O 1.一个unix文件就是一个m个字节的序列 2.unix外壳创建的每个进程开始时都有三个打开的文件:标准输入(0) .标准输出(1)和标准错误(-1). 二 ...
随机推荐
- 使用node+mysql进行后端开发
使用koa: koa2是一个类,所以引入koa后,要创建实例化“对象”,才能使用koa内部封装的方法. 设置监听端口: 处理http请求: 1.http请求处理链 A.通过app.use()注册asy ...
- ES8(2017)新特性学习
字符串填充 (1)从前填充:str.padStart(targetLength [, padString]); 示例: 'es8'.padStart(7, '0'); // '0000es8' (2) ...
- 10、Latent Relational Metric Learning via Memory-based Attention for Collaborative Ranking-----基于记忆注意的潜在关系度量协同排序
一.摘要: 本文模型 LRML(潜在相关度量学习)是一种新的度量学习方法的推荐.[旨在学习用户和项目之间的相关关系,而不是简单的用户和项目之间的push和pull关系,push和pull主要针对LMN ...
- Vim 学习指南
作者:耀耀 出处:http://www.linuxeden.com/html/news/20130820/142667.html Vim 学习指南 来源:开源中国社区 作者:耀耀 关注我们: 你想 ...
- GRUB 引导流程
GRUB(bootloader)引导流程: GRUB,GRand Unified Bootlader ,是一个来自GUN项目的多操作系统启动程序.GRUB是多启动规范的实现,它允许用户可以在计算机内 ...
- 安装SSH、配置SSH无密码登录 ssh localhost
集群.单节点模式都需要用到 SSH 登陆(类似于远程登陆,你可以登录某台 Linux 主机,并且在上面运行命令),Ubuntu 默认已安装了 SSH client,此外还需要安装 SSH server ...
- mysql linux查看配置文件my.cnf位置
原文:mysql linux查看配置文件my.cnf位置 命令: mysql --help | grep 'Default options' -A 1
- ActiveMQ_Windows和Linux版本的安装部署
1, 保证电脑上安装了jdk6以上版本的java,并配置了好环境变量 : 2, 官方下载地址:http://activemq.apache.org/download-archives.html ,这里 ...
- webserver的作用!
常见的webserver:Apache和Nginx(linux平台) IIS(window平台) 非常多小公司小项目眼下不一定使用了webserver,由于流量下,单台应用server能够支撑. 实际 ...
- Maven传递依赖的时候,同名包不同版本号的包均会下载,可是编译的时候,仅仅会载入一个高版本号的。
描写叙述,在一个Maven项目中.同一时候依赖了spring-tomcat-weaver 和 struts-core 包.可是spring-tomcat-weaver 须要commons-dige ...