Linux 下的两个脚本
//videoserver
#!/bin/bash
#
# videoserver
#
# chkconfig: 3456 11 91
# description: videoserver
# Source function library.
. /etc/rc.d/init.d/functions
prog="videoserver"
start() {
# Start daemons.
echo -n $"Starting $prog: "
/video/videoserver/recordvideosvr /video/videoserver/recordvideosvr.ini
/video/videoserver/writedvdsvr /video/videoserver/writedvdsvr_drv1.ini
/video/videoserver/writedvdsvr /video/videoserver/writedvdsvr_drv2.ini
/video/videoserver/TCPRecordServer
/video/videoserver/vodsvr
/video/videoserver/netupdatesvr
/video/videoserver/transfileserver
/video/videoserver/DevMngSvr /video/videoserver/DevMngSvr.ini &
/video/videoserver/doDevMngSvr &
/video/videoserver/doRebroadcastServer /video/videoserver/RebroadcastServerInit.ini &
/video/videoserver/doRebroadcastServer /video/videoserver/RebroadcastServerInit1.ini &
/video/videoserver/doRebroadcastServer /video/videoserver/RebroadcastServerInit2.ini &
/video/videoserver/RebroadcastServer /video/videoserver/RebroadcastServerInit3.ini &
# /video/videoserver/RebroadcastServer /video/videoserver/RebroadcastServerInit4.ini &
/video/videoserver/ComControlSvr /video/videoserver/ComControlSvr.ini &
}
stop() {
# Stop daemons.
echo -n $"Stopping $prog: "
killproc livevideosvr
killproc recordvideosvr
killproc writedvdsvr
killproc streamserver
}
case "$1" in
start)
start
;;
stop)
stop
;;
*)
echo $"Usage: $0 {start|stop}"
exit 1
esac
exit $?
//install
#!/bin/bash
#
# install
#
cd /video/videoserver
#cp -f livevideosvr /video/videoserver
#cp -f recordvideosvr /video/videoserver
#cp -f dvdwriterserver /video/videoserver
#cp -f vodsvr /video/videoserver
#cp -f vtservice /video/vtservice
cp -f videoserver /etc/rc.d/init.d/
cd /etc/rc.d/init.d
chmod 777 videoserver
chkconfig --del videoserver
chkconfig --add videoserver
cd /video/videoserver
chmod 777 livevideos
相关文档:
例一:发送Signaling Packet:
Signaling Command是2个Bluetooth实体之间的L2CAP层命令传输。所以得Signaling Command使用CID 0x0001.
多个Command可以在一个C-frame(control frame)中发送。
如果要直接发送Signaling Command.需要建立SOCK_RAW类型的L2CAP连接Socket。这样才有机会自己填充Command Code,Identi ......
Linux的网络系统主要是基于BSD Unix 的socket机制, 访问网络设备的驱动程序不需要使用设备节点。在系统和驱动程序之间定义有专门的数据结构(sk_buff)进行数据的传递。系统内部支持对发送数据和接收数据的缓存,提供流量控制机制,提供对多协议的支持。因此,选择哪个驱动程序是基于内核内部的其他决定,而不是调用open() ......
嵌入式Linux下彩色LCD驱动的设计与实现
摘要:本文介绍了如何在嵌入在开发彩色LCD显示驱动的方法,并对Linux中的显示驱动程序结构和框架作一介绍。
长期以来,在常见的掌上电脑(PDA)等小型手持式设备上,由于硬件条件等的限制,我们看到的显示器件通常是单色LCD,用户界面也非常简单,几乎看不到 PC ......
转贴地址:http://www.linuxsir.org/main/?q=node/137
总结:
zhy2111314
来自:
LinuxSir.Org
整理:
北南南北
摘要:
本文是find 命令的详细说明,可贵的是针对参数举了很多的实例,大量的例证,让初学者更为容易理解;本文是zhyfly兄贴在论坛中;我对本文进行了再次整理,为方便大家阅读;
目录
版权声明
前 ......
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <net/if.h>
int sock_fd;
struct my_addr;
struct ifreq ifr;
unsigned char * addr;
#define ETH_INTERFACE_NAME "e ......