redhat용 init script를 gentoo 환경으로 변경

웃는 남자의 이미지

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"
Necromancer의 이미지

이런이런... 데비안용을 받으셔야죠. 구동스크립트를 /etc/init.d에
넣으면 젠투에서도 자~알 돌아갑니다.

Written By the Black Knight of Destruction

웃는 남자의 이미지

헉...그런 건가요? :shock:
혼자 이리저리 삽질 했군요.
감사합니다.

----------------------------------------
Nothing left after Nirvana.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.