系统级脚本 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). 二 ...
随机推荐
- 阿里云数据库MySQL版快速上手!
MySQL是全球最受欢迎的开源数据库,其在各Web应用中均有广泛部署.阿里云数据库MySQL版基于Alibaba的MySQL源码分支,经过双11高并发.大数据量的考验,拥有优良的性能和吞吐量.除此之外 ...
- Java 应用运维
作者:http://blogread.cn/it/article/4918?f=wb 出处:http://blogread.cn/it/article/4918?f=wb Java应用运维 出处 ...
- 安装Nginx的各种报错的解决
如题,本人环境Ubuntu14.0虚拟机,安装一个nginx服务器来运行我的fastDfs文件管理的.但是安装出现了各种问题: sudo ./configure --prefix=/usr/local ...
- python3 列表操作
- 创建列表 #创建列表: list1 = [1, 2, 3, 4, 5] - 向列表中添加元素 - append # 向列表中添加元素: list1 = [1, 2, 3, 4, 5] list1. ...
- Tomcat样例安全漏洞
[漏洞描述] Tomcat在使用的时候一般都直接官网下载源代码包直接使用. 默认情况下,Tomcat源码包里面包含了 examples 这个目录,这个目录主要实现一些样例页面的访问. 比如: ...
- C/s模式与B/S模式
C/S模式事是client/server,即客服端/服务模式
- UVA 11294 - Wedding(Two-Set)
UVA 11294 - Wedding 题目链接 题意:有n对夫妻,0号是公主.如今有一些通奸关系(男男,女女也是可能的)然后要求人分配在两側.夫妻不能坐同一側.而且公主对面一側不能有两个同奸的人,问 ...
- eclipse 设置代码大小和布局里面代码大小
Eclipse字体大小调整: Window / Preferences / General / Appearance / ColorsAnd Fonts .在右边的对话框里选择Java – Java ...
- the process android.process.acore has stopped或the process com.phone。。。。
模拟器一启动 The process android.process.acore has stopped unexpectedly 今天不知道怎么回事,模拟器一启动就狂报错, 模拟器已经重新安装过了, ...
- sql server执行动态拼接sql(带传参数)和去掉小数点后0的函数
1 exec sp_executesql N'SELECT 2 [Extent2].[Id] AS [Id], 3 [Extent2].[Name] AS [Name], 4 [Extent2].[D ...