Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 32930 Details for
Bug 53338
Submitting Init-rc support for DynDnsUpdate ebuild
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Init-RC script
dyndnsupdate.rc6 (text/plain), 2.20 KB, created by
Julien TIERNY
on 2004-06-08 12:13:15 UTC
(
hide
)
Description:
Init-RC script
Filename:
MIME Type:
Creator:
Julien TIERNY
Created:
2004-06-08 12:13:15 UTC
Size:
2.20 KB
patch
obsolete
>#!/sbin/runscript ># Copyright 1999-2004 Gentoo Technologies, Inc. ># Distributed under the terms of the GNU General Public License v2 ># $Header:$ > >depend() { > use logger net local >} > >get_arg() { > local ARG=$1 > local CAT=$(which cat) > local CONF_FILE="/etc/dyndnsupdate.conf" > > NEXT=0 > for LINE in `$CAT $CONF_FILE 2> /dev/null`; do > LINE=${LINE//\\#*/} > FILE=$FILE"\n"$LINE > if [ $NEXT = 1 ] > then > RESULT=$LINE > NEXT=0 > fi > if [ ! -z $LINE ] && [ $LINE = $ARG ] > then > NEXT=1 > fi > done > RESULT=${RESULT//\"/} >} > >get_conf() { > > get_arg domainname > DOMAINNAME=$RESULT > > get_arg hostname > HOSTNAME=$RESULT > > get_arg dyndnsaccount > LOGIN=$RESULT > > get_arg dyndnspassword > PASSWD=$RESULT > > get_arg internetinterface > INTERFACE=$RESULT >} > >get_address() { > local CAT=$(which cat) > local CACHE="/var/dyndnsupdate/ipcache" > > RESULT=`$CAT $CACHE` >} > >checkconfig() { > get_arg domainname > DOMAINNAME=$RESULT > if [ ! -z $RESULT ] && [ $RESULT = "your_domainname_here" ] > then > ewarn "You have to configure the DynDns utility." > ewarn "Please edit /etc/dyndnsupdate.conf." > eend 1 "Failed to update status at DynDns.org" > fi >} > >start() { > local DYNDNS=$(which dyndnsupdate) > local RM=$(which rm) > local CACHE="/var/dyndnsupdate/ipcache" > > ebegin "Updating IP address at DynDns.org" > checkconfig || return 1 > get_conf > if [ -e $CACHE ] > then > $RM $CACHE > fi > $DYNDNS -- -h $HOSTNAME.$DOMAINNAME \ > -u $LOGIN:$PASSWD -i $INTERFACE -lf \ > > /dev/null 2>&1 > eend $? "Failed to update status at DynDns.org" >} > >stop () { > local CAT=$(which cat) > local DYNDNS=$(which dyndnsupdate) > local GREP=$(which grep) > local LOG_FILE="/var/dyndnsupdate/offline" > > ebegin "Setting host offline at DynDns.org" > get_address > get_conf > $DYNDNS -o -h $HOSTNAME.$DOMAINNAME \ > -u $LOGIN:$PASSWD -a $RESULT -f \ > > $LOG_FILE 2>&1 > RESSOURCE=`$CAT $LOG_FILE | $GREP \ > "gethostbyname:\ Resource\ temporarily\ unavailable"` > if [ ! -z ${RESSOURCE// /} ] > then > eend 1 "Failed to update status at DynDns.org" > else > STATUS=`$CAT $LOG_FILE | $GREP \ > "when\ the\ user\ is\ not\ a\ donator"` > if [ ! -z ${STATUS// /} ] > then > eerror "You have to be a donator to profit"\ > "from offline status." > fi > eend $? "Failed to update status at DynDns.org" > fi >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 53338
:
32927
|
32929
| 32930 |
32931
|
32932
|
32933
|
32934