--- noip-updater-1.6.orig/Makefile +++ noip-updater-1.6/Makefile @@ -1,3 +1,19 @@ +#!/usr/bin/make -f + +SHELL = /bin/sh + +# Variables for commands +INSTALL = /usr/bin/install +INSTALL_PROGRAM = $(INSTALL) -m 755 +INSTALL_DATA = $(INSTALL) -m 600 + +# Path names for installation +prefix = /usr/local +exec_prefix = $(prefix) +bindir = $(exec_prefix)/bin +sbindir = $(exec_prefix)/sbin +sysconfdir = $(prefix)/etc + TGT=noip CC=gcc @@ -10,18 +26,24 @@ # LIBS=-lsocket -lnsl # ARCH=sun +all : ${TGT} + ${TGT}: noip.c - ${CC} -O2 -g -D${ARCH} noip.c -o noip ${LIBS} + ${CC} ${PACKAGING_FLAGS} -O2 -g -D${ARCH} noip.c -o noip ${LIBS} conf: ./no-ip.sh -install: no-ip.conf ${TGT} - cp ${TGT} /usr/local/bin/${TGT} - cp no-ip.conf /usr/local/lib/no-ip.conf - chmod 600 /usr/local/lib/no-ip.conf +install: all + mkdir --parents $(sbindir) + $(INSTALL_PROGRAM) ${TGT} $(sbindir)/noip-updater + # $(INSTALL_PROGRAM) no-ip.sh $(sbindir)/noip-updater-config + # cp no-ip.conf $(sysconfdir)/no-ip.conf + # chmod 600 $(sysconfdir)/no-ip.conf clean: - rm -f *o + rm -f *.o rm -f no-ip.conf rm -f ${TGT} + +.PHONY : all conf install uninstall clean --- noip-updater-1.6.orig/README.FIRST +++ noip-updater-1.6/README.FIRST @@ -25,7 +25,7 @@ ########################################################################### HOW TO START THE CLIENT -The noip executable can be run by typing /usr/local/bin/noip +The noip-updater executable can be run by typing /usr/sbin/noip-updater If you want it to run automatically when the machine is booted, then place the following script in your startup directory. (/etc/init.d/rcX.d @@ -35,12 +35,12 @@ #! /bin/sh case "$1" in start) - echo "Starting noip." - /usr/local/bin/noip + echo "Starting noip-updater." + /usr/sbin/noip-updater ;; stop) - echo -n "Shutting down noip." - killproc -TERM /usr/local/bin/noip + echo -n "Shutting down noip-updater." + killproc -TERM /usr/sbin/noip-updater ;; *) echo "Usage: $0 {start|stop}" @@ -56,9 +56,9 @@ ########################################################################### SAVED STATE -Noip will save the last IP address that was set at no-ip.com to a file, -/tmp/no-ip_save, when it ends. This file will be read back in the next -time noip is started in DAEMON mode. +Noip will save the last IP address that was set at no-ip.com to a file, +/var/lib/noip-updater/last-ip, when it ends. This file will be read +back in the next time noip-updater is started in DAEMON mode. ########################################################################### COMMAND LINE ARGUMENTS WHEN INVOKING THE CLIENT @@ -68,7 +68,7 @@ daemon mode, the client will override that setting and run once and exit. The actions of the client are controlled by a configuration file. It is -usually located in /usr/local/lib/no-ip.conf, but may be placed anywhere if +usually located in /etc/noip-updater.conf, but may be placed anywhere if the [-c new_location] argument is passed on the startup line. All errors and informational messages are stored via the syslog facility. @@ -79,7 +79,7 @@ One final invocation parameter is -h. This displays the help screen as shown below and ends. -USAGE: noip [-c config_file] [-h] [-l] [-i IPaddress] [-d] +USAGE: noip-updater [-c config_file] [-h] [-l] [-i IPaddress] [-d] Version Linux-1.6 Options: -c config_file use alternate config file @@ -88,8 +88,7 @@ -l log output to stderr -d increase debug verbosity - config file is either - /usr/local/lib/no-ip.conf or /usr/local/etc/no-ip.conf + config file is /etc/no-ip.conf and must contain 10 required entries in the form of KEYWORD = value A complete description of the config file is in the README file. KEYWORD value (example) @@ -151,11 +150,12 @@ If the first character of the value is not 'Y' or 'y', 'N' is assumed. The device used to make your external connection is listed on the -'DEVICE = devx' line. The value for this line can be obtained by looking at -the output of the /sbin/ifconfig program while connected to the Net, or -by running the ./no-ip.sh program which will list the valid devices. -This value is ignored if you are using Network Address Translation mode (NAT), -but it must be present. Using 'DEVICE = unused' is suggested. +'DEVICE = devx' line. The value for this line can be obtained by +looking at the output of the /sbin/ifconfig program while connected to +the Net, or by running the /usr/sbin/noip-updater-config program which +will list the valid devices. This value is ignored if you are using +Network Address Translation mode (NAT), but it must be present. Using +'DEVICE = unused' is suggested. The remaining five lines consist of LOGIN, PASSWORD, HOSTNAME, DOMAIN and GROUP. LOGIN = your login at no-ip.com (usually your email address) --- noip-updater-1.6.orig/noip.c +++ noip-updater-1.6/noip.c @@ -94,9 +94,8 @@ #define CLIENT_IP_PORT 8245 #define OURBUFLEN 8192 #define IPLEN 16 -#define SAVEDIPFILE "/tmp/no-ip_save" -#define CONFIG_FILENAME "/usr/local/lib/no-ip.conf" -#define CONFIG_FILENAME_ETC "/usr/local/etc/no-ip.conf" +#define SAVEDIPFILE "/var/lib/noip-updater/last-ip" +#define CONFIG_FILENAME "/etc/noip-updater.conf" #define CONFIGNUM 10 #define CONFSTRLEN 1024 #define NUMBER 2 @@ -154,7 +153,7 @@ int log2syslog = 1; int connect_fail = 0; char *noipname = "dynupdate.no-ip.com"; -char *program = "noip"; +char *program = "noip-updater"; char *version = "1.6.0"; char *os = "Linux"; char error_filename[20] = "/tmp/NO-IPXXXXXX"; @@ -224,8 +223,8 @@ #ifdef DEBUG fprintf(stderr, " -d increase debug verbosity\n"); #endif - fprintf(stderr, "\n config file is either\n"); - fprintf(stderr, " %s or %s\n", CONFIG_FILENAME,CONFIG_FILENAME_ETC); + fprintf(stderr, "\n config file is\n"); + fprintf(stderr, " %s\n", CONFIG_FILENAME); fprintf(stderr, " and must contain %d required entries", CONFIGNUM); fprintf(stderr, " in the form of KEYWORD = value\n"); fprintf(stderr, " A complete description of the config file is in the README file.\n"); @@ -257,8 +256,6 @@ if (config_filename == NULL) { if(!access(CONFIG_FILENAME, R_OK)) config_filename = CONFIG_FILENAME; - else - config_filename = CONFIG_FILENAME_ETC; } if (handle_config_error(parse_config()) != SUCCESS) return -1; @@ -418,6 +415,9 @@ char *err_string, *fp; FILE *fildes; +#ifdef DEBIAN + x = 0; +#else x = fork(); switch (x) { case -1: // error @@ -427,6 +427,7 @@ default: // parent exit(0); case 0: //child +#endif setsid(); syslog(LOG_INFO, "%s started as a background process%s\n", program, (nat) ? ((proxy) ? @@ -464,8 +465,10 @@ } sleep(delay); } +#ifndef DEBIAN break; } +#endif return x; } ///////////////////////////////////////////////////////////////////////// --- noip-updater-1.6.orig/debian/README.Debian +++ noip-updater-1.6/debian/README.Debian @@ -0,0 +1,32 @@ +noip-updater for Debian +----------------------- + +This is a tidied-up & debianised version of no-ip.com's noip-updater. + +The differences from the upstream version are: + +- There is no support for running as a daemon "out-of-the box". The + default config targetted towards dial-up (or more precisely ppp) + users. Users who are assigned IP addresses via DHCP will need to + tweak the config and start the daemon themselves. + +- The command name is now noip-updater, rather than just noip. + +- Configuration file is /etc/noip-updater.conf, instead of + either /usr/local/lib/no-ip.conf or /usr/local/etc/no-ip.conf + +- The config file has a much stricter syntax; spaces are no longer + allowed before/after '='. This simplified semiautomatic + (re)configuration + +- The original no-ip.sh script is now called noip-updater-configure; it + will create a fully annotated config file, rather than the bare-bones + one created by the upstream version + +- The last known IP address is stored under /var/lib/noip-updater, + rather than /tmp + +- the main Makefile have been tidied up to follow the GNU standards + better. + + -- Karl E. Jorgensen , Thu, 28 Mar 2002 20:24:11 +0000 --- noip-updater-1.6.orig/debian/changelog +++ noip-updater-1.6/debian/changelog @@ -0,0 +1,25 @@ +noip-updater (1.6-3) unstable; urgency=low + + * Removed the group feature - the current debconf implementation is + wrong and breaks things. It will be added back in once there is a + working implementation. + + -- Karl E. Jorgensen Fri, 24 Jan 2003 14:13:42 +0000 + +noip-updater (1.6-2) unstable; urgency=low + + * Now supports running as a daemon + + -- Karl E. Jorgensen Thu, 15 Aug 2002 14:00:50 +0100 + +noip-updater (1.6-1) unstable; urgency=low + + * Initial Release. + * Tidied-up version of the upstream - follows the FHS + * Standard configuration file is fully annotated + * Config file is now consistently called /etc/noip-updater.conf + * Supports both running in daemon mode and dial-up mode + * Debconf'inised + + -- Karl E. Jorgensen Thu, 6 Jun 2002 23:09:00 +0100 + --- noip-updater-1.6.orig/debian/conffiles +++ noip-updater-1.6/debian/conffiles @@ -0,0 +1,2 @@ +/etc/ppp/ip-up.d/noip-updater +/etc/init.d/noip-updater --- noip-updater-1.6.orig/debian/config +++ noip-updater-1.6/debian/config @@ -0,0 +1,249 @@ +#!/bin/sh + +set -e + +umask 077 + +. /usr/share/debconf/confmodule + +# Update the debconf database with a value from the config file +# Synopsis: +# set_dc_var +# If the value is empty, we'll flag it as "unseen", so debconf will ask +# it (depending on priority/frontend) +set_dc_var() +{ + if [ "$2" ]; then + db_set noip-updater/$1 "$2" || : + else + db_fset noip-updater/$1 seen false || : + fi +} + +# Similar to set_dc_var, but for booleans. +set_dc_var_bool() +{ + case "$2" in + Y*|y*) + db_set noip-updater/$1 true || : + ;; + N*|n*) + db_set noip-updater/$1 false || : + ;; + *) + db_fset noip-updater/$1 seen false + ;; + esac +} + +db_version 2.0 + +db_title "noip-updater" + +# We want to allow the users to go back to previous questions +db_capb backup + +CONFIG=/etc/noip-updater.conf + +# For development purposes only +# CONFIG=./dummy-config + +# Set up variables to mark "unknown" values. +LOGIN="" +PASSWORD="" +HOSTNAME="" +DOMAIN="" +DEVICE="" +NAT="" +PROXY="" +DAEMON="" +INTERVAL="" + +# If there is a config file already (e.g. from a previous version), +# we'll obey that, rather than what's in debconf's database. +if [ -e $CONFIG ] +then + # TODO: We really should check whether the config file is "safe"; + # i.e. only writeable by root. + . $CONFIG +fi + +# Update the debconf database with the values we know of. +# Note that this is *outside* the above if/fi, since this ensures that +# the admin *will* be asked (depending on priority/frontend) the +# relevant questions. +# Scenario: +# - jbloggs install noip-updater. It gets configured during install as +# usual. +# - jbloggs blows away the config file. +# - in a state of panic, he removes (without purging) noip-updater +# - followed by a reinstall. +# In this scenario, the debconf data are still intact, but the config +# file is not. And since he probably has debconf configured to only ask +# each question once, we have to convince debconf that they haven't been +# seen yet. +# +set_dc_var login "$LOGIN" +set_dc_var password "$PASSWORD" +set_dc_var hostname "$HOSTNAME" +set_dc_var domain "$DOMAIN" + +set_dc_var_bool nat "$NAT" +set_dc_var_bool proxy "$PROXY" +set_dc_var_bool daemon "$DAEMON" + +set_dc_var interval "$INTERVAL" + +setstate() +{ + if db_go; then + state=$2 + else + state=$1 + fi +} + +state=auth +while [ $state != finished ] +do + case $state in + auth) + # We MUST have answers to login & password, or we will fail + # miserably. Hence no "... || exit 0". + db_beginblock + db_input high noip-updater/login || exit 0 + db_input high noip-updater/password || exit 0 + db_endblock + setstate cancel fqdn + if [ $state = fqdn ] + then + db_get noip-updater/login || : + the_login="$RET" + case "$the_login" in + "") + # Got to fill in something. Go back and ask again. + # But first tell the admin about his foolish mistake + db_fset noip-updater/login seen false + db_fset noip-updater/login-missing seen false + state=auth + db_input high noip-updater/login-missing || : + db_go || : + continue + ;; + *@*.*) + # A valid address - somewhat. + # Unfortunately most shells don't have more + # advanced regular expressions, so this check + # will have to do. + # E.g. this does not check for invalid + # characters. Tough. + : + ;; + *) + db_fset noip-updater/login seen false + db_fset noip-updater/login-invalid seen false + db_subst noip-updater/login-invalid login "$the_login" + db_input high noip-updater/login-invalid || : + db_go || : + state=auth + continue + esac + + db_get noip-updater/password || : + if [ -z "$RET" ]; then + # Got to fill in something. Go back and ask again. + # But first tell the admin about his foolish mistake + db_fset noip-updater/password seen false + db_fset noip-updater/password-missing seen false + db_input high noip-updater/password-missing + db_go || : + state=auth + continue + fi + fi + ;; + fqdn) + # Again, we MUST have answers to these two. So no "|| :" + db_beginblock + db_input high noip-updater/hostname + db_input high noip-updater/domain + db_endblock + setstate auth daemon + if [ $state = daemon ]; then + db_get noip-updater/hostname || : + the_hostname="$RET" + case "$the_hostname" in + "") + db_fset noip-updater/hostname seen false + db_fset noip-updater/hostname-missing seen false + state=fqdn + db_input high noip-updater/hostname-missing || : + db_go || : + continue + ;; + *.*) + db_fset noip-updater/hostname seen false + db_fset noip-updater/hostname-invalid seen false + state=fqdn + db_subst noip-updater/hostname-invalid hostname "$the_hostname" + db_input high noip-updater/hostname-invalid || : + db_go || : + continue + ;; + *) + : + ;; + esac + + db_get noip-updater/domain || : + the_domain="$RET" + case "$the_domain" in + "") + db_fset noip-updater/domain seen false + db_fset noip-updater/domain-missing seen false + state=fqdn + db_input high noip-updater/domain-missing || : + db_go || : + continue + ;; + *.*) + : + ;; + *) + db_fset noip-updater/domain seen false + db_fset noip-updater/domain-invalid seen false + state=fqdn + db_subst noip-updater/domain-invalid domain "$the_domain" + db_input high noip-updater/domain-invalid || : + db_go || : + continue + ;; + esac + fi + ;; + daemon) + db_beginblock + db_input medium noip-updater/daemon || : + db_input low noip-updater/interval || : + db_endblock + setstate fqdn natproxy + ;; + natproxy) + db_beginblock + db_input low noip-updater/nat || : + db_input low noip-updater/proxy || : + db_endblock + setstate daemon finished + ;; + cancel) + exit 2 + ;; + *) + # We shouldn't end up in here! + echo 1>&2 noip-updater: Internal config error: Unknown state \"$state\" + exit 2 + ;; + esac +done + +db_stop --- noip-updater-1.6.orig/debian/control +++ noip-updater-1.6/debian/control @@ -0,0 +1,16 @@ +Source: noip-updater +Section: net +Priority: extra +Maintainer: Karl E. Jorgensen +Build-Depends: debhelper (>> 3.0.0) +Standards-Version: 3.5.2 + +Package: noip-updater +Architecture: any +Depends: ${shlibs:Depends}, sed (>= 3.02), mawk | original-awk | gawk, debconf (>= 0.5.00) +Description: Dynamic DNS update client for use with no-ip.com's free service + No-ip.com's free dynamic DNS service allows you to have a fixed + internet-reachable hostname, even when your IP address varies. + To use this, you need to subscribe for a (free) account with www.no-ip.com, + and choose a hostname and a domain name. + For full details no-ip's service, see http://www.no-ip.com --- noip-updater-1.6.orig/debian/copyright +++ noip-updater-1.6/debian/copyright @@ -0,0 +1,16 @@ +This package was debianized by Karl E. Jorgensen on +Thu, 28 Mar 2002 20:24:11 +0000. + +It was downloaded from : + http://www.no-ip.com/downloads.php + +Upstream Author(s): johna@onevista.com + +Copyright (C) 2000 Free Software Foundation, Inc + (transferred from One Vista Associates) + +License: Gnu General Public License, version 2 + +Note that the above copyright only covers the dynamic dns update client, +which only will be usable once signed up with no-ip.com's service. The +terms and conditions for their service are available during sign-up. --- noip-updater-1.6.orig/debian/dirs +++ noip-updater-1.6/debian/dirs @@ -0,0 +1,5 @@ +usr/sbin +var/lib/noip-updater +usr/share/doc/noip-updater/ +usr/share/noip-updater/ +etc/ppp/ip-up.d --- noip-updater-1.6.orig/debian/docs +++ noip-updater-1.6/debian/docs @@ -0,0 +1 @@ +README.FIRST --- noip-updater-1.6.orig/debian/noip-updater.init +++ noip-updater-1.6/debian/noip-updater.init @@ -0,0 +1,65 @@ +#!/bin/sh +# +# Based on: +# skeleton example file to build /etc/init.d/ scripts. +# This file should be used to construct scripts for /etc/init.d. +# +# Written by Miquel van Smoorenburg . +# Modified for Debian GNU/Linux +# by Ian Murdock . +# +# Version: @(#)skeleton 1.8 03-Mar-1998 miquels@cistron.nl +# +# This file was automatically customized by dh-make on Sat, 22 Jun 2002 22:07:22 +0100 +# And manually customised by karl@jorgensen.com at Sat Jun 22 23:35:53 BST 2002 + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/noip-updater +NAME=noip-updater +DESC='No-ip.com Dynamic DNS Updater daemon (noip-updater)' +CONFIG=/etc/noip-updater.conf + +test -f $DAEMON || exit 0 +test -f $CONFIG || exit 0 + +set -e + +cd / + +# The variable DAEMON is also used in the config file :-( +# So we have to use this roundabout way to avoid overwriting it while +# still getting its value. +runasdaemon=`. $CONFIG; echo $DAEMON` + +[ "$runasdaemon" = Y ] || exit 0 + +case "$1" in + start) + echo -n "Starting $DESC: " + start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ + --oknodo --background --make-pidfile --exec $DAEMON + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon --oknodo --stop --quiet --pidfile /var/run/$NAME.pid \ + --oknodo --exec $DAEMON + echo "$NAME." + ;; + reload|restart|force-reload) + echo -n "Restarting $DESC: " + start-stop-daemon --oknodo --stop --quiet --pidfile /var/run/$NAME.pid \ + --oknodo --exec $DAEMON + sleep 1 + start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ + --oknodo --background --make-pidfile --exec $DAEMON + echo "$NAME." + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 --- noip-updater-1.6.orig/debian/postinst +++ noip-updater-1.6/debian/postinst @@ -0,0 +1,99 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule +db_version 2.0 + +#DEBHELPER# + +umask 077 +CONFIG=/etc/noip-updater.conf +SAMPLE_CONFIG=/usr/share/noip-updater/noip-updater.conf + +# For development purposes only +#CONFIG=./dummy-config +#SAMPLE_CONFIG=./sample-config + +if [ "$1" = configure ] || [ "$1" = reconfigure ] ; then + # Pull the values out of the debconf database and update the config + # file accordingly. + + NEWCONFIG=${CONFIG}.new + if [ -e $CONFIG ] ; then + cp $CONFIG $NEWCONFIG + else + cp $SAMPLE_CONFIG $NEWCONFIG + fi + + TMPCONFIG=$CONFIG.tmp + + # Update a single value in $NEWCONFIG. + # Synopsis: + # setvalue keyword value + setvalue() + { + if grep '^'$1'=.*$' $NEWCONFIG > /dev/null + then + # Variable already specified. Replace the definition + sed -e 's/^'"$1"'=.*$/'"${1}=${2}/" < $NEWCONFIG > $TMPCONFIG + mv $TMPCONFIG $NEWCONFIG + elif grep '^# *'$1'=.*$' $NEWCONFIG > /dev/null + then + # Variable specification is commented out. Replace the comment + # by a proper definition + sed -e 's/^# *'"$1"'=.*$/'"${1}=${2}/" < $NEWCONFIG > $TMPCONFIG + mv $TMPCONFIG $NEWCONFIG + else + # Variable not specified !? Add it at the end. + echo "${1}=${2}" >> $NEWCONFIG + fi + } + + for var in "login LOGIN" "password PASSWORD" "hostname HOSTNAME" \ + "domain DOMAIN" "nat NAT" "proxy PROXY" \ + "daemon DAEMON" "interval INTERVAL" + do + template=`set -- $var ; echo $1` + confvar=`set -- $var ; echo $2` + + if db_get noip-updater/$template ; then + if [ -n "$RET" ] ; then + # Only modify the config if we actually have a value + # from the debconf database. This should avoid blanking + # out the password :-) + case $template in + nat|proxy|daemon) + # Debconf uses true/false, config file uses Y/N... + if $RET ; then + value=Y + else + value=N + fi + ;; + *) + value="$RET" + esac + setvalue $confvar "$value" + fi + fi + done + + # We don't want the password lingering in the debconf database. + db_set noip-updater/password "" || true + + # Make sure that we preserve the permissions on the config file. + if [ -e $CONFIG ] ; then + cat $NEWCONFIG > $CONFIG + rm -f $NEWCONFIG + else + # No config file!? Give it some sensible permissions + mv $NEWCONFIG $CONFIG + chmod 600 $CONFIG + fi + rm -f $TMPCONFIG +fi + +db_stop || true + +exit 0 --- noip-updater-1.6.orig/debian/postrm +++ noip-updater-1.6/debian/postrm @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +#DEBHELPER# + +case "$1" in + purge) + if [ -f /etc/noip-updater.conf ] + then + rm -f /etc/noip-updater.conf + fi + ;; +esac --- noip-updater-1.6.orig/debian/ppp-up +++ noip-updater-1.6/debian/ppp-up @@ -0,0 +1,21 @@ +#!/bin/sh + +updater=/usr/sbin/noip-updater +config=/etc/noip-updater.conf + +[ -x $updater ] || exit 0 +[ -e $config ] || exit 0 + +. $config + +# This script is not relevant if noip-updater is intended to run as a daemon +[ "$DAEMON" = N ] || exit 0 + +case "$PPP_LOCAL" in + 192.168.*|10.*) + # Dont register non-routeable IP address with no-ip.com + exit 0 + ;; +esac + +$updater -i $PPP_LOCAL --- noip-updater-1.6.orig/debian/rules +++ noip-updater-1.6/debian/rules @@ -0,0 +1,82 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatability version to use. +export DH_COMPAT=3 + +configure: configure-stamp +configure-stamp: + dh_testdir + # There is no configuration to run for noip-updater. + touch configure-stamp + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + # Compile the package. + $(MAKE) PACKAGING_FLAGS=-DDEBIAN + #/usr/bin/docbook-to-man debian/noip-updater.sgml > noip-updater.1 + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + # Commands to clean up after the build process. + -$(MAKE) clean + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Commands to install the package into debian/noip-updater. + $(MAKE) install prefix=$(CURDIR)/debian/noip-updater/usr sysconfdir=$(CURDIR)/debian/noip-updater/etc + install --mode=644 debian/sample-config $(CURDIR)/debian/noip-updater/usr/share/doc/noip-updater/noip-updater.conf + install --mode=644 debian/sample-config $(CURDIR)/debian/noip-updater/usr/share/noip-updater/noip-updater.conf + install --mode=755 debian/ppp-up $(CURDIR)/debian/noip-updater/etc/ppp/ip-up.d/noip-updater + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installdebconf + dh_installdocs +# dh_installexamples +# dh_installmenu +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime + dh_installinit +# dh_installcron +# dh_installman +# dh_installinfo + dh_undocumented noip-updater.8 + dh_installchangelogs + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_makeshlibs + dh_installdeb +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- noip-updater-1.6.orig/debian/sample-config +++ noip-updater-1.6/debian/sample-config @@ -0,0 +1,111 @@ +# Configuration file for noip-updater -- /etc/noip-updater.conf + +# If you prefer not to use a text editor to modify the noip-updater +# configuration, you may want to use 'noip-updater-configure' instead; +# this allows you to edit the configuration by answering a series of +# questions. + +# Comments lines are allowed, as long as they have a '#' at the +# *beginning* of the line. +# +# Configuration parameters are specified in the format of +# KEYWORD=value +# +# Notes: +# +# - KEYWORD is the name of the configuration parameter - all upper case, +# without quotes. It must start at the beginning of the line. +# +# - White space is NOT allowed, neither before nor after the equals sign. +# +# - The value starts immediately after the equals sign and continues +# until a semicolon (';') or the end of the line is seen (excluding +# any trailing whitespaces). Quoting is NOT allowed. +# +# Reporting of syntax errors is nearly non-existent. + +# The username for your no-ip.com registration. +# Normally, the username will be your email address. +# +# There is no default value. +#LOGIN=somebody@somewhere.org + +# The password for your no-ip.com registration. +# +# Note that shell special characters are NOT ALLOWED in the password. +# Also note that the detection of such characters is nearly +# non-existent; expect the unexpected. +# +# Apart from the above, normal guidelines for choosing good passwords +# apply. +# +# Make sure that you do not use the same password ANYWHERE else, as it +# will cross the internet in plain-text, and may be visible in the +# access logs of any HTTP proxies/servers between you and no-ip.com. +# +# There is no default value. +#PASSWORD=TheVerySecretPassword + +# The hostname you have registered with no-ip.com. This is the "simple" +# hostname, not the fully qualified name +# +# There is no default value. +#HOSTNAME=MyRegisteredHostName + +# The domain name under which your hostname is registered. Basically, +# it is the FQDN without the HOSTNAME part. +# +# There is no default value. +#DOMAIN=no-ip.org + +# Set this if you use a group name instead of a host.domain.name +# +# By default this is empty; but it must be specified. +GROUP= + +# When the -i option is not used, the IP address of this network +# interface will be used. +# +# There is no default value. +DEVICE= + +# NAT controls whether the IP address is obtained from the local network +# interface (NAT=N), or by an getpeername(2) operation at no-ip.com. +# I.e. if your local IP address it not externally visible, set this to +# Y, and the IP address of your firewall (or HTTP proxy, depending on +# config & ISP) will be used instead. +# Otherwise set it to N. +# +# If in doubt, set it to Y. +# +# Default: NAT=N +#NAT=N + +# By default, we'll connect to port 80 @ no-ip.com. However, some ISPs +# will force customers to use their HTTP proxy, which will make +# no-ip.com believe that the ISP's proxy is initiating the connection +# (and thus getting the wrong IP address if NAT is set). +# +# If PROXY is set, then we'll connect to a high-numbered port (currently +# 8245) that will (usually) bypass the ISP's proxy. +# +# This should only matter when NAT is set. +# +# If in doubt, set it to Y. +# +# Default: PROXY=N +#PROXY=N + +# Whether or not to run in "daemon" mode. When running in daemon mode, +# noip-updater will fork(2) and detach itself from the tty. +# +# Default: DAEMON=N +#DAEMON=N + +# When running in daemon mode, it will check the IP address every +# INTERVAL minutes. If the IP address has changed, the new address will +# be registered with no-ip.com. +# Not relevant when DAEMON = N +# +# Default: INTERVAL=30 +#INTERVAL=30 --- noip-updater-1.6.orig/debian/templates +++ noip-updater-1.6/debian/templates @@ -0,0 +1,165 @@ +Template: noip-updater/login +Type: string +Description: What email address did you use for registering with no-ip.com? + To prevent unauthorised use of noip.com's service, you need to supply + an email address and a password. + . + If you have not yet registered with no-ip.com, then cancel out now. + Once registered, run "dpkg-reconfigure noip-updater" or edit + /etc/noip-updater.conf manually. + +Template: noip-updater/login-missing +Type: note +Description: You did not enter a login name + In order to use noip.com's service, you need to register first. Once + registered, use the same email address here. + +Template: noip-updater/login-invalid +Type: note +Description: You did not enter a valid login name. + The login name you entered ("${login}") is not valid. + . + If you have not registered with no-ip.com, then you should cancel any + dialogs from noip-updater until you have. + +Template: noip-updater/password +Type: password +Description: What is your no-ip.com password? + To prevent unauthorised use of noip.com's service, you need to supply + an email address and a password. + . + Note that shell special characters are NOT ALLOWED in the password. For + now, you should stick with a combination of: + lower or upper case letters, numbers [0-9], + punctuations (dot, comma, colon) equal signs "=", + underscores "_" forward slashes "/" + . + Apart from the above, normal guidelines for choosing good passwords + apply. + . + Make sure that you do not use the same password ANYWHERE else, as it + will cross the internet in plain-text, and may be visible in the + access logs of any HTTP proxies/servers between you and no-ip.com. + . + Depending on which debconf front-end you use, the password may or may + not be echoed (or shown as asterisks). + +Template: noip-updater/password-missing +Type: note +Description: You did not enter a password. + In order to use noip.com's service, you need to register first. Once + registered, use the same password here. + +Template: noip-updater/hostname +Type: string +Description: What hostname have you registered with no-ip.com? + The hostname you have registered with no-ip.com. This is the "simple" + hostname, not the fully qualified domain name. + +Template: noip-updater/hostname-missing +Type: note +Description: You did not enter a hostname to use with no-ip.com. + Since the whole point of using no-ip.com's service is to get a + hostname, you really must enter a hostname. + +Template: noip-updater/hostname-invalid +Type: note +Description: The hostname you entered was not valid. + "${hostname}" is not a valid hostname. + . + Note that hostnames cannot contain any dots; the part after the first + dot is called the domain name. + +Template: noip-updater/domain +Type: string +Description: What domain name are you using with no-ip.com? + The domain name you will be using with no-ip.com. Usually this will be + one of: + 3utilities.com, bounceme.net, + hopto.org, myftp.biz, + myftp.org, myvnc.com, + no-ip.biz, no-ip.com, + no-ip.info, no-ip.org, + redirectme.net, servebeer.com, + servecounterstrike.com, serveftp.com, + servehalflife.com, servehttp.com, + serveirc.com, servemp3.com, + servepics.com, servequake.com, + sytes.net zapto.org + (or any other domains that no-ip.com has made available + since this package was written). + +Template: noip-updater/domain-missing +Type: note +Description: You did not enter a domain to use with no-ip.com. + Since the whole point of using no-ip.com's service is to get a + hostname, you really must enter a hostname. + +Template: noip-updater/domain-invalid +Type: note +Description: The domain you entered was not valid. + "${domain}" is not a valid domain. + . + A proper domain name should contain at least one dot. + +Template: noip-updater/device +Type: string +Description: Which device is your internet connection? + Dialup users should leave this blank. + Dialup users (and some ADSL users) should probably enter 'ppp0' here; + others probably 'eth0'. + +Template: noip-updater/nat +Type: boolean +Default: true +Description: Is there a firewall between you and the internet? + If there is a firewall between you and the internet, then people + cannot connect directly to you - and your local IP address is + meaningless. + . + Answering 'no' means that your IP address will be obtained from the + local system. + . + Answering 'yes' means that no-ip.com will look at what your IP address + *appears* to be, and use that. Thus it will use the IP address of your + firewall. + . + If you don't know what this means, answer yes. + +Template: noip-updater/proxy +Type: boolean +Default: true +Description: Does your ISP force you to use a HTTP proxy? + By default, no-ipdater will connect to port 80 @ no-ip.com. However, + some ISPs will force customers to use their (often transparent) HTTP + proxy. From no-ip.com's point of view it will then look like the + connection is originating from the HTTP proxy. + . + Answering 'yes' will configure noip-updater to connect to a + non-standard port, thus bypassing the HTTP proxy. This will work + regardless of whether there is a proxy involved. + . + Answering 'no' will configure noip-updater to use the default port + 80. + . + If you don't know what all this means, answer yes. + +Template: noip-updater/daemon +Type: boolean +Default: false +Description: Should noip-updater run in "daemon" mode? + When running in daemon mode, noip-updater will periodically register + your IP address with no-ip.com. + . + If you have a permanent (= always-on) internet connection, answer yes. + . + Otherwise answer no. + +Template: noip-updater/interval +Type: string +Default: 30 +Description: How often should noip-updater check your IP address? + When running in daemon mode, noip-updater will wake up every XX + minutes to check whether your IP address has change. If it has + changed, it will update no-ip.com's database accordingly. +