Hello community,
here is the log from the commit of package dhcp for openSUSE:Factory
checked in at Wed Dec 1 02:06:05 CET 2010.
--------
--- dhcp/dhcp.changes 2010-08-04 17:57:51.000000000 +0200
+++ dhcp/dhcp.changes 2010-11-30 23:01:13.000000000 +0100
@@ -1,0 +2,42 @@
+Tue Nov 30 21:56:04 UTC 2010 - mt@suse.de
+
+- Fixed to use same/correct dhcrelay6 interface variables in the
+ sysconfig file and in the dhcrelay6 init script.
+
+-------------------------------------------------------------------
+Mon Nov 29 15:45:09 CET 2010 - mt@suse.de
+
+- Updated to ISC DHCP 4.2.0-P1 release, providing a security fix to
+ handle a relay forward message with an unspecified address in the
+ link address field. Previously such a message would cause the
+ server to crash. Thanks to a report from John Gibbons.
+ [ISC-Bugs #21992] CERT: VU#102047 CVE: CVE-2010-3611 (bnc#650902)
+ The 4.2.0 version is a feature release, implementing asynchronous
+ DDNS processing and includes "The LDAP Patch".
+ For a complete list of changes from any previous release, please
+ consult the RELNOTES file within the source distribution or on
+ the ISC website: http://www.isc.org/software/dhcp/420
+- Fixed compilation to avoid segfaults as soon as ldap is enabled,
+ merged our ldap patches from 4.1.x branch.
+
+-------------------------------------------------------------------
+Tue Nov 2 09:48:56 UTC 2010 - mt@suse.de
+
+- Fixed a dhcrelay segfault while receiving packets on interfaces
+ without any IPv4 address assigned (bnc#631305, reported upsteam
+ as [ISC-Bugs #22409]).
+- Fixed a common infinite loop while parsing options with optional
+ parts in the value such as in slp-service-scope option (bnc#643845,
+ reported upsteam as [ISC-Bugs #22410]).
+- Fixed init scripts to report correct LSB codes in status action,
+ when the config file or the binary do not exists (bnc#640336).
+- Fixed syntax of a check in the rcdhcrelay[6] (bnc#648580)
+- Avoid pid check error message in the rcdhcpd[6] (bnc#646875)
+
+-------------------------------------------------------------------
+Wed Sep 29 10:26:37 UTC 2010 - mt@suse.de
+
+- Fixed server lease file path in contrib/listlease and leasestate
+ changed to extract contrib and examples using setup macro.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
dhcp-4.1.1-P1.tar.bz2
dhcp-4.1.1-dhclient-no-libcrypto.diff
dhcp-4.1.1-dhclient-send-hostname-rml.diff
dhcp-4.1.1-ldap-patch-mt-01.diff.bz2
dhcp-4.1.1-ldap-patch-mt-01_option-numbers.diff
New:
----
contrib-lease-path.diff
dhcp-4.1.1-P1-optional-value-infinite-loop.diff
dhcp-4.1.1-P1-relay-no-ip-on-interface.diff
dhcp-4.2.0-P1-dhclient-send-hostname-rml.diff
dhcp-4.2.0-P1-ldap-patch-mt01.diff.bz2
dhcp-4.2.0-P1-no-libcrypto.diff
dhcp-4.2.0-P1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ dhcp.spec ++++++
--- /var/tmp/diff_new_pack.vG2fhy/_old 2010-12-01 01:26:59.000000000 +0100
+++ /var/tmp/diff_new_pack.vG2fhy/_new 2010-12-01 01:26:59.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package dhcp (Version 4.1.1.P1)
+# spec file for package dhcp (Version 4.2.0.P1)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -17,7 +17,7 @@
# norootforbuild
-%define isc_version 4.1.1-P1
+%define isc_version 4.2.0-P1
%define susefw2dir %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
%define omc_prefix /usr/share/omc
%define omc_svcdir %{omc_prefix}/svcinfo.d
@@ -32,13 +32,11 @@
License: BSD3c(or similar)
Group: Productivity/Networking/Boot/Servers
AutoReqProv: on
-Version: 4.1.1.P1
-Release: 6
+Version: 4.2.0.P1
+Release: 1
Summary: Common Files Used by ISC DHCP Software
Url: http://www.isc.org/software/dhcp
Source0: dhcp-%{isc_version}.tar.bz2
-#Source0: http://ftp.isc.org/isc/dhcp/dhcp-%{isc_version}.tar.gz
-#Source1: http://ftp.isc.org/isc/dhcp/dhcp-%{isc_version}.tar.gz.asc
#
Source10: rc.dhcpd
Source11: rc.dhcpd6
@@ -73,16 +71,15 @@
Patch12: dhcp-4.1.1-man-includes.diff
Patch13: dhcp-4.1.1-tmpfile.diff
Patch14: dhcp-4.1.1-in6_pktinfo-prototype.diff
+Patch15: contrib-lease-path.diff
Patch20: dhcp-4.1.1-dhclient-exec-filedes.diff
-Patch21: dhcp-4.1.1-dhclient-send-hostname-rml.diff
+Patch21: dhcp-4.2.0-P1-dhclient-send-hostname-rml.diff
## patch lives here: http://www.suse.de/~mt/git/dhcp-ldap.git/
-%if 0%{?with_ldap:1}
-Patch30: dhcp-4.1.1-ldap-patch-mt-01.diff.bz2
-Patch31: dhcp-4.1.1-ldap-patch-mt-01_option-numbers.diff
-%else
-Patch30: dhcp-4.1.1-dhclient-no-libcrypto.diff
-%endif
+Patch30: dhcp-4.2.0-P1-ldap-patch-mt01.diff.bz2
+Patch39: dhcp-4.2.0-P1-no-libcrypto.diff
Patch40: dhcp-4.1.1-P1-lpf-bind-msg-fix.diff
+Patch41: dhcp-4.1.1-P1-relay-no-ip-on-interface.diff
+Patch42: dhcp-4.1.1-P1-optional-value-infinite-loop.diff
##
PreReq: /bin/touch /sbin/chkconfig sysconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -191,22 +188,23 @@
%prep
-%setup -q -n %{name}-%{isc_version}
+%setup -q -n %{name}-%{isc_version} -a 44 -a 45
##
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
+%patch15 -p0
%patch20 -p1
%patch21 -p1
-%if 0%{?with_ldap:%with_ldap}
-%patch30 -p1
-%patch31 -p1
-%else
+%if 0%{?with_ldap:1}
%patch30 -p1
%endif
+%patch39 -p1
%patch40 -p1
+%patch41 -p1
+%patch42 -p1
##
find . -type f -name \*.cat\* -exec rm -f {} \;
dos2unix contrib/ms2isc/*
@@ -238,8 +236,9 @@
--enable-paranoia \
--enable-early-chroot \
%if 0%{?with_ldap:%with_ldap}
- --enable-ldap-conf \
- --enable-ldap-casa \
+ --with-ldap \
+ --with-ldapcrypto \
+ --with-ldapcasa \
%endif
--with-cli-pid-file=%{_localstatedir}/run/dhclient.pid \
--with-cli-lease-file=%{_localstatedir}/lib/dhcp/dhclient.leases \
@@ -273,7 +272,9 @@
install -d -m0755 $RPM_BUILD_ROOT%{_sysconfdir}/init.d
install -d -m0755 $RPM_BUILD_ROOT/%{susefw2dir}
install -d -m0755 $RPM_BUILD_ROOT/%{omc_svcdir}
+%if 0%{?with_ldap:%with_ldap}
install -d -m0755 $RPM_BUILD_ROOT%{_sysconfdir}/openldap/schema
+%endif
install -d -m0755 $RPM_BUILD_ROOT%{_localstatedir}/run
install -d -m0755 $RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates
# chroot jail
@@ -319,8 +320,10 @@
install -m0644 $RPM_SOURCE_DIR/sysconfig.dhcrelay \
$RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates/
# another config files and scripts
-install -m0644 contrib/dhcp.schema \
+%if 0%{?with_ldap:%with_ldap}
+install -m0644 contrib/ldap/dhcp.schema \
$RPM_BUILD_ROOT%{_sysconfdir}/openldap/schema
+%endif
install -m0644 $RPM_SOURCE_DIR/dhcpd.xml \
$RPM_SOURCE_DIR/dhcpd6.xml \
$RPM_BUILD_ROOT/%{omc_svcdir}/
@@ -339,16 +342,9 @@
install -m0644 $RPM_SOURCE_DIR/dhcp.README README.SuSE
install -m0644 $RPM_SOURCE_DIR/dhcp.README.upgrade README.upgrade
install -m0644 $RPM_SOURCE_DIR/DDNS-howto.txt .
-tar xzf $RPM_SOURCE_DIR/contrib.tar.gz
-mv doc/examples .
-tar xzf $RPM_SOURCE_DIR/examples.tar.gz
+cp doc/examples/* ./examples/
rm -f doc/{References.xml,Makefile*}
rm -f contrib/dhcp.spec
-%if ! 0%{?with_ldap:%with_ldap}
-rm -f doc/draft-ietf-dhc-ldap-schema-01.txt
-rm -f contrib/dhcp.schema README.ldap
-rm -f contrib/dhcpd-conf-to-ldap.pl
-%endif
%pre server
/usr/sbin/useradd -r -g nogroup -s /bin/false -c "DHCP server daemon" -d /var/lib/dhcp dhcpd 2> /dev/null ||:
@@ -383,6 +379,10 @@
%insserv_cleanup
%post relay
+%{rename_sysconfig_variable -f etc/sysconfig/dhcrelay
+ DHCRELAY6_LOWER_INTERFACES_ARGS DHCRELAY6_LOWER_INTERFACES}
+%{rename_sysconfig_variable -f etc/sysconfig/dhcrelay
+ DHCRELAY6_UPPER_INTERFACES_ARGS DHCRELAY6_UPPER_INTERFACES}
%{fillup_and_insserv -n dhcrelay dhcrelay dhcrelay6}
%preun relay
@@ -445,7 +445,7 @@
%doc %{_mandir}/man8/dhcpd.8.gz
%doc %{_mandir}/man5/dhcpd.conf.5.gz
%doc %{_mandir}/man5/dhcpd.leases.5.gz
-%if 0%{?with_ldap:1}
+%if 0%{?with_ldap:%with_ldap}
%dir %{_sysconfdir}/openldap
%dir %{_sysconfdir}/openldap/schema
%attr(0644, root, root) %config %{_sysconfdir}/openldap/schema/dhcp.schema
++++++ contrib-lease-path.diff ++++++
--- contrib/leasestate
+++ contrib/leasestate 2010/09/29 10:07:09
@@ -16,7 +16,7 @@ my %Update;
my $level = 1;
my $IP = '';
my ($ip, $bs, $nbs, $join);
-open(FILE, "/var/lib/dhcp/dhcpd.leases");
+open(FILE, "/var/lib/dhcp/db/dhcpd.leases");
while(my $line = <FILE>) {
next if ($line =~ /^\#/);
if ($level == 1) {
--- contrib/listlease
+++ contrib/listlease 2010/09/29 10:08:10
@@ -14,7 +14,7 @@ use strict;
my $LastLease = '';
my $savelease = 0;
my $prlease = 0;
-my $LFILE = "/var/lib/dhcp/dhcpd.leases";
+my $LFILE = "/var/lib/dhcp/db/dhcpd.leases";
$LFILE = $ARGV[1] if ($ARGV[1] ne '');
open(FILE, $LFILE);
++++++ dhcp-4.1.1-P1-optional-value-infinite-loop.diff ++++++
From 912eb17103f764ef4486b30a4801af64321a23ed Mon Sep 17 00:00:00 2001
From: Marius Tomaschewski
Date: Fri, 29 Oct 2010 18:51:02 +0200
Subject: [PATCH] dhcp-4.1.1-P1-optional-value-infinite-loop
Fixed dhcp server infinite loop while parsing options with optional
parts in the value such as in slp-service-scope option (bnc#643845,
[ISC-Bugs #22410]).
Signed-off-by: Marius Tomaschewski
---
common/parse.c | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/common/parse.c b/common/parse.c
index 34b909a..081dcc9 100644
--- a/common/parse.c
+++ b/common/parse.c
@@ -4931,8 +4931,23 @@ struct option *option;
do {
if ((*fmt == 'A') || (*fmt == 'a'))
break;
- if (*fmt == 'o')
+ if (*fmt == 'o') {
+ /* previous value were optional */
+ fmt++;
continue;
+ }
+ if (fmt[1] == 'o') {
+ /*
+ * value for current format code is optional
+ * check if the next token is a semicolon;
+ * it is expected to be read by our caller.
+ */
+ token = peek_token (&val, (unsigned *)0, cfile);
+ if (token == SEMI) {
+ fmt++;
+ continue;
+ }
+ }
tmp = *expr;
*expr = NULL;
--
1.7.1
++++++ dhcp-4.1.1-P1-relay-no-ip-on-interface.diff ++++++
From 4509d956715297469469ab0e207c2641f521470d Mon Sep 17 00:00:00 2001
From: Marius Tomaschewski
Date: Fri, 29 Oct 2010 18:49:06 +0200
Subject: [PATCH] dhcp-4.1.1-P1-relay-no-ip-on-interface
Fix for a dhcrelay segfault while receiving packets on interfaces
without any IPv4 address assigned (bnc#631305, [ISC-Bugs #22409]).
Signed-off-by: Marius Tomaschewski
---
relay/dhcrelay.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c
index 11676ae..c375c83 100644
--- a/relay/dhcrelay.c
+++ b/relay/dhcrelay.c
@@ -565,6 +565,10 @@ do_relay4(struct interface_info *ip, struct dhcp_packet *packet,
log_info("Discarding packet with invalid hlen.");
return;
}
+ if (ip->address_count < 1 || ip->addresses == NULL) {
+ log_info("Discarding packet from interface without IP address");
+ return;
+ }
/* Find the interface that corresponds to the giaddr
in the packet. */
--
1.7.1
++++++ dhcp-4.2.0-P1-dhclient-send-hostname-rml.diff ++++++
diff --git a/client/dhclient.8 b/client/dhclient.8
index b805528..d31fa8d 100644
--- a/client/dhclient.8
+++ b/client/dhclient.8
@@ -60,6 +60,9 @@ dhclient - Dynamic Host Configuration Protocol Client
.I port
]
[
+.B -H hostname
+]
+[
.B -d
]
[
@@ -227,6 +230,11 @@ If a different port is specified for the client to listen on and
transmit on, the client will also use a different destination port -
one less than the specified port.
.PP
+The
+.B -H
+flag may be used to specify a client hostname that should be sent to
+the DHCP server. Note, that this option is a SUSE/Novell extension.
+.PP
The DHCP client normally transmits any protocol messages it sends
before acquiring an IP address to, 255.255.255.255, the IP limited
broadcast address. For debugging purposes, it may be useful to have
diff --git a/client/dhclient.c b/client/dhclient.c
index 15c31a5..65e9c23 100644
--- a/client/dhclient.c
+++ b/client/dhclient.c
@@ -108,6 +108,7 @@ main(int argc, char **argv) {
int no_dhclient_db = 0;
int no_dhclient_pid = 0;
int no_dhclient_script = 0;
+ char *dhclient_hostname = NULL;
#ifdef DHCPv6
int local_family_set = 0;
#endif /* DHCPv6 */
@@ -212,6 +213,16 @@ main(int argc, char **argv) {
if (++i == argc)
usage();
mockup_relay = argv[i];
+ } else if (!strcmp (argv[i], "-H")) {
+ if (++i == argc || !argv[i] || *(argv[i]) == '\0')
+ usage ();
+ if (strlen (argv[i]) > HOST_NAME_MAX) {
+ log_error("-H option host-name string \"%s\" is too long:"
+ "maximum length is %d characters",
+ argv[i], HOST_NAME_MAX);
+ exit(1);
+ }
+ dhclient_hostname = argv [i];
} else if (!strcmp(argv[i], "-nw")) {
nowait = 1;
} else if (!strcmp(argv[i], "-n")) {
@@ -445,6 +456,32 @@ main(int argc, char **argv) {
/* Parse the dhclient.conf file. */
read_client_conf();
+ /* If the user specified a hostname, send it here and now */
+ if ((dhclient_hostname != NULL) && (*dhclient_hostname != '\0') ) {
+ struct parse *cfile = NULL;
+ char buf[HOST_NAME_MAX + 40];
+ int len;
+
+ snprintf (buf, sizeof(buf), "send host-name \"%s\";", dhclient_hostname);
+ len = strlen(buf);
+
+ status = new_parse (&cfile, -1, buf, len, "host-name option", 0);
+ if (status != ISC_R_SUCCESS)
+ log_fatal ("Cannot parse send host-name statement!");
+
+ for (;;) {
+ const char *val = NULL;
+ int token;
+
+ token = peek_token (&val, (unsigned *)0, cfile);
+ if (token == END_OF_FILE)
+ break;
+
+ parse_client_statement (cfile, NULL, &top_level_config);
+ }
+ end_parse (&cfile);
+ }
+
/* Parse the lease database. */
read_client_leases();
@@ -674,12 +711,12 @@ static void usage()
log_error("Usage: dhclient %s %s",
#ifdef DHCPv6
- "[-4|-6] [-SNTP1dvrx] [-nw] [-p <port>] [-D LL|LLT]",
+ "[-4|-6] [-SNTP1dvrx] [-nw] [-H <hostname>] [-p <port>] [-D LL|LLT]",
#else /* DHCPv6 */
- "[-1dvrx] [-nw] [-p <port>]",
+ "[-1dvrx] [-nw] [-H <hostname>] [-p <port>]",
#endif /* DHCPv6 */
"[-s server]");
- log_error(" [-cf config-file] [-lf lease-file]%s",
+ log_error(" [-cf config-file] [-lf lease-file] %s",
"[-pf pid-file] [-e VAR=val]");
log_fatal(" [-sf script-file] [interface]");
}
++++++ dhcp-4.2.0-P1-ldap-patch-mt01.diff.bz2 ++++++
++++ 1086 lines (skipped)
++++++ dhcp-4.2.0-P1-no-libcrypto.diff ++++++
diff --git a/configure.ac b/configure.ac
index b880616..3e0d11b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -420,8 +420,12 @@ AC_TRY_LINK(
AC_CHECK_HEADERS(sys/socket.h net/if_dl.h net/if6.h regex.h)
# find an MD5 library
+saved_LIBS="$LIBS"
+LIBS=""
AC_SEARCH_LIBS(MD5_Init, [crypto])
AC_SEARCH_LIBS(MD5Init, [crypto])
+CRYPTO_LIBS="$LIBS"
+LIBS="$saved_LIBS"
# Solaris needs some libraries for functions
AC_SEARCH_LIBS(socket, [socket])
++++++ dhcp-4.1.1-P1.tar.bz2 -> dhcp-4.2.0-P1.tar.bz2 ++++++
dhcp/dhcp-4.1.1-P1.tar.bz2 dhcp/dhcp-4.2.0-P1.tar.bz2 differ: char 11, line 1
++++++ rc.dhcpd ++++++
--- /var/tmp/diff_new_pack.vG2fhy/_old 2010-12-01 01:27:00.000000000 +0100
+++ /var/tmp/diff_new_pack.vG2fhy/_new 2010-12-01 01:27:00.000000000 +0100
@@ -96,14 +96,33 @@
# considered a success.
if ! [ -x "$DAEMON_BIN" ]; then
- if [ "$1" = "stop" ]; then exit 0; fi
- echo >&2 "$0: \"$DAEMON_BIN\" is not an executable file. Exiting."
- exit 5
+ case $1 in
+ stop) ;;
+ *) echo -n >&2 "$0: \"$DAEMON_BIN\" is not an executable file. Exiting."
+ case $1 in
+ status) rc_failed 4 ;;
+ *) rc_failed 5 ;;
+ esac
+ rc_status -v
+ ;;
+ esac
+ rc_exit
fi
if ! [ -r "$DAEMON_CONF" ] ; then
- if [ "$1" = "stop" ]; then exit 0; fi
- echo >&2 "$0: \"$DAEMON_CONF\" config file missed. Exiting."
- exit 6
+ case $1 in
+ stop|status)
+ if test ! -s /etc/sysconfig/dhcpd ; then
+ test -e $DAEMON_STATE/$DAEMON_PIDFILE && \
+ CHROOT_PREFIX="$DAEMON_STATE" || CHROOT_PREFIX=''
+ fi
+ ;;
+ *)
+ echo -n >&2 "$0: \"$DAEMON_CONF\" config file missed. Exiting."
+ rc_failed 6
+ rc_status -v
+ rc_exit
+ ;;
+ esac
fi
# remove empty pid files to avoid disturbing warnings by checkproc/killproc
@@ -223,7 +242,7 @@
## we remove the pid. (dhcpd itself only checks whether the pid is alive or not.)
if test -e $CHROOT_PREFIX/$DAEMON_PIDFILE -a -s $CHROOT_PREFIX/$DAEMON_PIDFILE; then
p=$(<$CHROOT_PREFIX/$DAEMON_PIDFILE)
- if test -n "$p" && grep -qE "^${DAEMON_BIN}" "/proc/$p/cmdline" ; then
+ if test -n "$p" && grep -qsE "^${DAEMON_BIN}" "/proc/$p/cmdline" ; then
echo -n '(already running) '
else
rm $CHROOT_PREFIX/$DAEMON_PIDFILE
++++++ rc.dhcpd6 ++++++
--- /var/tmp/diff_new_pack.vG2fhy/_old 2010-12-01 01:27:00.000000000 +0100
+++ /var/tmp/diff_new_pack.vG2fhy/_new 2010-12-01 01:27:00.000000000 +0100
@@ -100,14 +100,33 @@
# considered a success.
if ! [ -x "$DAEMON_BIN" ]; then
- if [ "$1" = "stop" ]; then exit 0; fi
- echo >&2 "$0: \"$DAEMON_BIN\" is not an executable file. Exiting."
- exit 5
+ case $1 in
+ stop) ;;
+ *) echo -n >&2 "$0: \"$DAEMON_BIN\" is not an executable file. Exiting."
+ case $1 in
+ status) rc_failed 4 ;;
+ *) rc_failed 5 ;;
+ esac
+ rc_status -v
+ ;;
+ esac
+ rc_exit
fi
if ! [ -r "$DAEMON_CONF" ] ; then
- if [ "$1" = "stop" ]; then exit 0; fi
- echo >&2 "$0: \"$DAEMON_CONF\" config file missed. Exiting."
- exit 6
+ case $1 in
+ stop|status)
+ if test ! -s /etc/sysconfig/dhcpd ; then
+ test -e $DAEMON_STATE/$DAEMON_PIDFILE && \
+ CHROOT_PREFIX="$DAEMON_STATE" || CHROOT_PREFIX=''
+ fi
+ ;;
+ *)
+ echo -n >&2 "$0: \"$DAEMON_CONF\" config file missed. Exiting."
+ rc_failed 6
+ rc_status -v
+ rc_exit
+ ;;
+ esac
fi
# remove empty pid files to avoid disturbing warnings by checkproc/killproc
@@ -227,7 +246,7 @@
## we remove the pid. (dhcpd itself only checks whether the pid is alive or not.)
if test -e $CHROOT_PREFIX/$DAEMON_PIDFILE -a -s $CHROOT_PREFIX/$DAEMON_PIDFILE; then
p=$(<$CHROOT_PREFIX/$DAEMON_PIDFILE)
- if test -n "$p" && grep -qE "^${DAEMON_BIN}" "/proc/$p/cmdline" ; then
+ if test -n "$p" && grep -qsE "^${DAEMON_BIN}" "/proc/$p/cmdline" ; then
echo -n '(already running) '
else
rm $CHROOT_PREFIX/$DAEMON_PIDFILE
++++++ rc.dhcrelay ++++++
--- /var/tmp/diff_new_pack.vG2fhy/_old 2010-12-01 01:27:00.000000000 +0100
+++ /var/tmp/diff_new_pack.vG2fhy/_new 2010-12-01 01:27:00.000000000 +0100
@@ -25,6 +25,7 @@
# physical network segment to another.
### END INIT INFO
+DHCPv_OPT=-4
DAEMON="ISC DHCPv4 relay agent"
DAEMON_BIN=/usr/sbin/dhcrelay
DAEMON_CONF=/etc/sysconfig/dhcrelay
@@ -33,10 +34,19 @@
SUPPORTS_HUP="no"
test -s "$DAEMON_CONF" && . "$DAEMON_CONF"
-test -x $DAEMON_BIN || {
- echo >&2 "$0: \"$DAEMON_BIN\" is not executable."
- test "x$1" = xstop && exit 0 || exit 5
-}
+if ! [ -x "$DAEMON_BIN" ]; then
+ case $1 in
+ stop) ;;
+ *) echo -n >&2 "$0: \"$DAEMON_BIN\" is not an executable file. Exiting."
+ case $1 in
+ status) rc_failed 4 ;;
+ *) rc_failed 5 ;;
+ esac
+ rc_status -v
+ ;;
+ esac
+ rc_exit
+fi
# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
@@ -70,7 +80,9 @@
case "$1" in
start)
echo -n "Starting $DAEMON"
- checkproc $DAEMON_BIN && { echo -n "... already running"; rc_status -v; exit 0; }
+ checkproc -p $DAEMON_PIDFILE $DAEMON_BIN && {
+ echo -n "... already running"; rc_status -v; exit 0;
+ }
## If interfaces or servers are not set, skip starting of dhcrelay
## and return with "program not configured"
@@ -81,6 +93,7 @@
exit 6;
fi
+ DHCRELAY_INTERFACES_ARGS=''
for i in $DHCRELAY_INTERFACES ; do
DHCRELAY_INTERFACES_ARGS="$DHCRELAY_INTERFACES_ARGS -i $i"
done
@@ -91,8 +104,8 @@
# startproc should return 0, even if service is
# already running to match LSB spec.
test "$2" = "-v" && echo -en \
- "\nexecuting '$DAEMON_BIN $DHCRELAY_OPTIONS $DHCRELAY_INTERFACES_ARGS $DHCRELAY_SERVERS'"
- startproc -q -l $STARTPROC_LOGFILE $DAEMON_BIN $DHCRELAY_OPTIONS $DHCRELAY_INTERFACES_ARGS $DHCRELAY_SERVERS
+ "\nexecuting '$DAEMON_BIN $DHCPv_OPT $DHCRELAY_OPTIONS $DHCRELAY_INTERFACES_ARGS $DHCRELAY_SERVERS'"
+ startproc -q -l $STARTPROC_LOGFILE -p $DAEMON_PIDFILE $DAEMON_BIN $DHCPv_OPT $DHCRELAY_OPTIONS $DHCRELAY_INTERFACES_ARGS $DHCRELAY_SERVERS
rc=$?
if ! [ $rc -eq 0 ]; then
if [ $link = $base ] ; then
@@ -152,7 +165,7 @@
echo -n "Reload service $DAEMON"
- if "$SUPPORTS_HUP" = "yes" ; then
+ if [ "$SUPPORTS_HUP" = "yes" ] ; then
killproc -p $DAEMON_PIDFILE -HUP $DAEMON_BIN
#touch $DAEMON_PIDFILE
rc_status -v
@@ -165,7 +178,7 @@
## Like force-reload, but if daemon does not support
## signalling, do nothing (!)
- if "$SUPPORTS_HUP" = "yes" ; then
+ if [ "$SUPPORTS_HUP" = "yes" ] ; then
# If it supports signalling:
echo -n "Reload service $DAEMON"
killproc -p $DAEMON_PIDFILE -HUP $DAEMON_BIN
++++++ rc.dhcrelay6 ++++++
--- /var/tmp/diff_new_pack.vG2fhy/_old 2010-12-01 01:27:00.000000000 +0100
+++ /var/tmp/diff_new_pack.vG2fhy/_new 2010-12-01 01:27:00.000000000 +0100
@@ -25,7 +25,7 @@
# physical network segment to another.
### END INIT INFO
-
+DHCPv_OPT=-6
DAEMON="ISC DHCPv6 relay agent"
DAEMON_BIN=/usr/sbin/dhcrelay6
DAEMON_CONF=/etc/sysconfig/dhcrelay
@@ -34,10 +34,19 @@
SUPPORTS_HUP="no"
test -s "$DAEMON_CONF" && . "$DAEMON_CONF"
-test -x $DAEMON_BIN || {
- echo >&2 "$0: \"$DAEMON_BIN\" is not executable."
- test "x$1" = xstop && exit 0 || exit 5
-}
+if ! [ -x "$DAEMON_BIN" ]; then
+ case $1 in
+ stop) ;;
+ *) echo -n >&2 "$0: \"$DAEMON_BIN\" is not an executable file. Exiting."
+ case $1 in
+ status) rc_failed 4 ;;
+ *) rc_failed 5 ;;
+ esac
+ rc_status -v
+ ;;
+ esac
+ rc_exit
+fi
# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
@@ -71,14 +80,18 @@
case "$1" in
start)
echo -n "Starting $DAEMON"
- checkproc $DAEMON_BIN && { echo -n "... already running"; rc_status -v; exit 0; }
+ checkproc -p $DAEMON_PIDFILE $DAEMON_BIN && {
+ echo -n "... already running"; rc_status -v; exit 0;
+ }
+ DHCRELAY6_LOWER_INTERFACES_ARGS=''
for l in $DHCRELAY6_LOWER_INTERFACES ; do
- test x"$l" = x && continue
+ test "x$l" = x -o "x$l" = "x-l" && continue
DHCRELAY6_LOWER_INTERFACES_ARGS="$DHCRELAY6_LOWER_INTERFACES_ARGS -l $l"
done
+ DHCRELAY6_UPPER_INTERFACES_ARGS=''
for u in $DHCRELAY6_UPPER_INTERFACES ; do
- test x"$u" = x && continue
+ test "x$u" = x -o "x$u" = "x-u" && continue
DHCRELAY6_UPPER_INTERFACES_ARGS="$DHCRELAY6_UPPER_INTERFACES_ARGS -u $u"
done
@@ -99,8 +112,8 @@
# startproc should return 0, even if service is
# already running to match LSB spec.
test "$2" = "-v" && echo -en \
- "\nexecuting '$DAEMON_BIN $DHCRELAY6_OPTIONS $DHCRELAY6_LOWER_INTERFACES_ARGS $DHCRELAY6_UPPER_INTERFACES_ARGS'"
- startproc -q -l $STARTPROC_LOGFILE $DAEMON_BIN $DHCRELAY6_OPTIONS $DHCRELAY6_LOWER_INTERFACES_ARGS $DHCRELAY6_UPPER_INTERFACES_ARGS
+ "\nexecuting '$DAEMON_BIN $DHCPv_OPT $DHCRELAY6_OPTIONS $DHCRELAY6_LOWER_INTERFACES_ARGS $DHCRELAY6_UPPER_INTERFACES_ARGS'"
+ startproc -q -l $STARTPROC_LOGFILE -p $DAEMON_PIDFILE $DAEMON_BIN $DHCPv_OPT $DHCRELAY6_OPTIONS $DHCRELAY6_LOWER_INTERFACES_ARGS $DHCRELAY6_UPPER_INTERFACES_ARGS
rc=$?
if ! [ $rc -eq 0 ]; then
if [ $link = $base ] ; then
@@ -160,7 +173,7 @@
echo -n "Reload service $DAEMON"
- if "$SUPPORTS_HUP" = "yes" ; then
+ if [ "$SUPPORTS_HUP" = "yes" ] ; then
killproc -p $DAEMON_PIDFILE -HUP $DAEMON_BIN
#touch $DAEMON_PIDFILE
rc_status -v
@@ -173,7 +186,7 @@
## Like force-reload, but if daemon does not support
## signalling, do nothing (!)
- if "$SUPPORTS_HUP" = "yes" ; then
+ if [ "$SUPPORTS_HUP" = "yes" ] ; then
# If it supports signalling:
echo -n "Reload service $DAEMON"
killproc -p $DAEMON_PIDFILE -HUP $DAEMON_BIN
++++++ sysconfig.dhcrelay ++++++
--- /var/tmp/diff_new_pack.vG2fhy/_old 2010-12-01 01:27:00.000000000 +0100
+++ /var/tmp/diff_new_pack.vG2fhy/_new 2010-12-01 01:27:00.000000000 +0100
@@ -32,21 +32,21 @@
## Default: ""
## ServiceRestart: dhcrelay6
#
-# Specifies the ``lower'' network interface for DHCPv6 relay mode
-# separated by spaces.
+# Specifies the ``lower'' client link network interfaces for DHCPv6
+# relay -- separated by spaces.
# The format of the lower interface is: "[address%]ifname[#index]".
#
-DHCRELAY6_LOWER_INTERFACES_ARGS=""
+DHCRELAY6_LOWER_INTERFACES=""
## Type: string
## Default: ""
## ServiceRestart: dhcrelay6
#
-# Specifies the ``upper'' network interface for DHCPv6 relay mode
-# separated by spaces.
+# Specifies the ``upper'' server link network interfaces for DHCPv6
+# relay -- separated by spaces.
# The format of the upper interface is "[address%]ifname".
#
-DHCRELAY6_UPPER_INTERFACES_ARGS=""
+DHCRELAY6_UPPER_INTERFACES=""
## Type: string
## Default: ""
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org