redhat용 init script를 gentoo 환경으로 변경
글쓴이: 웃는 남자 / 작성시간: 수, 2004/11/24 - 4:52오후
KT-ADSL 을 사용하고 DHCP 로 아이피를 받아옵니다.
개인서버구축을 위해 DDNS 서비스를 사용할려고 wowdns.com 에서 클라이언트를 받았는데 구동스크립트가 redhat 용이네요.
제가 사용하는 Gentoo 에서 사용할려고 바꿀려는데 도움을 좀 부탁드립니다.
굳이 wowdns.com을 사용하려는 이유는 무료로 기존도메인으로 포워딩서비스
제공해 주기 때문입니다. ^_^
#! /bin/sh # # adding rc part # 1. cp wdscd_rh.sh /etc/rc.d/init.d/wdscd # 2. /sbin/chkconfig --add wdscd # # description: wdscd runnning script for redhat # processname: wdscd # Author : jung-suk han < jshan at slashpad.com > # Date : 2003.02.07 # http://www.wowdns.com # # Source function library. . /etc/rc.d/init.d/functions <-- /etc/init.d/functions.sh 로 변경 # Get config. . /etc/sysconfig/network <-- /etc/conf.d/net 로 변경 (맞는 건지?) # Check that networking is up. if [ ${NETWORKING} = "no" ] then exit 0 fi [ -f /usr/sbin/wdscd ] || exit 0 # See how we were called. case "$1" in start) echo -n "Starting wdscd: " daemon /usr/sbin/wdscd -x echo touch /var/lock/subsys/wdscd ;; stop) echo -n "Stopping wdscd: " killproc /usr/sbin/wdscd echo rm -f /var/lock/subsys/wdscd ;; status) status wdscd ;; restart) $0 stop $0 start ;; *) echo "Usage: wdscd {start|stop|status|restart}" exit 1 esac exit 0
# /etc/init.d/wdscd start 시 아래 에러가 발생합니다.
/etc/init.d/wdscd: line 21: [: =: unary operator expected Starting wdscd: /etc/init.d/wdscd: line 32: daemon: command not found
/etc/conf.d/net 의 내용
# /etc/conf.d/net: # $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18 19:39:22 azarah Exp $ # Global config file for net.* rc-scripts # This is basically the ifconfig argument without the ifconfig $iface # iface_eth0="dhcp" #iface_eth1="207.170.82.202 broadcast 207.0.255.255 netmask 255.255.0.0" # For DHCP set iface_eth? to "dhcp" # For passing options to dhcpcd use dhcpcd_eth? # #iface_eth0="dhcp" #dhcpcd_eth0="..." dhcpcd_eth0="-t 1" # For adding aliases to a interface # #alias_eth0="192.168.0.3 192.168.0.4" # NB: The next is only used for aliases. # # To add a custom netmask/broadcast address to created aliases, # uncomment and change accordingly. Leave commented to assign # defaults for that interface. # #broadcast_eth0="192.168.0.255 192.168.0.255" #netmask_eth0="255.255.255.0 255.255.255.0" # For setting the default gateway # #gateway="eth0/192.168.0.1"
Forums:
이런이런... 데비안용을 받으셔야죠. 구동스크립트를 /etc/init.d
이런이런... 데비안용을 받으셔야죠. 구동스크립트를 /etc/init.d에
넣으면 젠투에서도 자~알 돌아갑니다.
Written By the Black Knight of Destruction
헉...그런 건가요? :shock: 혼자 이리저리 삽질 했군요.
헉...그런 건가요? :shock:
혼자 이리저리 삽질 했군요.
감사합니다.
----------------------------------------
Nothing left after Nirvana.
댓글 달기