Hello community,
here is the log from the commit of package dhcp for openSUSE:Factory
checked in at Fri May 14 00:26:54 CEST 2010.
--------
--- dhcp/dhcp.changes 2010-04-29 13:18:44.000000000 +0200
+++ /mounts/work_src_done/STABLE/dhcp/dhcp.changes 2010-05-11 13:24:22.000000000 +0200
@@ -1,0 +2,24 @@
+Tue May 11 11:22:48 UTC 2010 - mt@suse.de
+
+- Fixed dhcprelay scripts to source sysconfig file correctly
+- Fixed spec file typo in arping path require, enabled ldap
+- Fixed a dhclient option name and new/old ip address check
+
+-------------------------------------------------------------------
+Fri May 7 14:10:21 UTC 2010 - mt@suse.de
+
+- Updated to ISC DHCP 4.1.1, the current 4.x series production
+ release, providing DHCPv6 client/server/relay implementation.
+ The programs act in DHCPv6 mode, when the -6 start option is set.
+ We install separate init scripts with a 6 at the end to handle
+ them, that is /etc/init.d/dhcpd6 and dhrelay6. Further, there is
+ also a link to the binaries with a 6 at the end, e.g. dhclient6,
+ making it visible, that the installed version supports DHCPv6.
+- Moved additional documentation to a separate dhcp-doc package.
+- Changed to provide config files and scripts as source files
+ instead of patches to the ISC scripts.
+- Adopted spec file and config/scripts, merged in all patches.
+- Implemented RFC 3442 classless static routes support in the
+ dhclient-script (bnc#555870).
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
clearip
dhcp-3.1-ESV.tar.bz2
dhcp-3.1.1-dhclient-conf.dif
dhcp-3.1.1-dhclient-exec-filedes.dif
dhcp-3.1.1-dhclient-send-hostname-rml.dif
dhcp-3.1.1-dhclient-use-script-cmdline.dif
dhcp-3.1.1-man-includes.dif
dhcp-3.1.1-omapi-test.c.dif
dhcp-3.1.1-paranoia.dif
dhcp-3.1.1-paths.dif
dhcp-3.1.1-pie.dif
dhcp-3.1.1-tmpfile.dif
dhcp-3.1.3-dhclient-conf.bnc516459.dif
dhcp-3.1.3-dhclient-script.bnc555095.dif
dhcp-3.1.3-dhclient-script.bnc585380.dif
dhcp-3.1.3-dhclient-script.dif
dhcp-3.1.3-ldap-patch-mt-01.diff.bz2
dhcpsync
dhcpsync.8
dnscompr.py
leases.awk
leasestate
listlease
reset-ip
New:
----
contrib.tar.gz
dhclient-script
dhclient.conf
dhclient6.conf
dhcp-4.1.1-default-paths.diff
dhcp-4.1.1-dhclient-exec-filedes.diff
dhcp-4.1.1-dhclient-no-libcrypto.diff
dhcp-4.1.1-dhclient-send-hostname-rml.diff
dhcp-4.1.1-in6_pktinfo-prototype.diff
dhcp-4.1.1-ldap-patch-mt-01.diff.bz2
dhcp-4.1.1-man-includes.diff
dhcp-4.1.1-paranoia.diff
dhcp-4.1.1-tmpfile.diff
dhcp-4.1.1.tar.bz2
dhcpd.conf
dhcpd6.conf
dhcpd6.xml
rc.dhcpd6
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ dhcp.spec ++++++
++++ 765 lines (skipped)
++++ between dhcp/dhcp.spec
++++ and /mounts/work_src_done/STABLE/dhcp/dhcp.spec
++++++ SuSEfirewall2.dhcp-server ++++++
--- /var/tmp/diff_new_pack.9UkwTu/_old 2010-05-14 00:26:15.000000000 +0200
+++ /var/tmp/diff_new_pack.9UkwTu/_new 2010-05-14 00:26:15.000000000 +0200
@@ -1,5 +1,5 @@
-## Name: DHCP Server
-## Description: Opens ports for ISC DHCP Server.
+## Name: DHCPv4 Server
+## Description: Opens ports for ISC DHCPv4 4.x Server.
#
# For a more detailed description of the individual variables see
# the comments for FW_SERVICES_*_EXT in /etc/sysconfig/SuSEfirewall2
++++++ dhclient-script ++++++
++++ 624 lines (skipped)
++++++ dhclient.conf ++++++
#
# /etc/dhclient.conf -- dhclient configuration file
# See "man dhclient.conf" for further details
#
######################################################
# Sometimes, a special configuration is required for
# e.g. Cable Modem providers (@Home -- TCI).
# For example, it may be required to send out a special
# dhcp-client-identifier or to override some settings.
#
# Uncomment and fill in the appropriate settings:
#
#send dhcp-client-identifier "c32423-a"
# or as hex octets
#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
#
# Note, that hostname is usually send using -H option.
#send host-name "andare.fugue.com";
#
#supersede domain-name "fugue.com home.vix.com";
#prepend domain-name-servers 127.0.0.1;
#
#####################################################
# uncomment to request a specific lease time, otherwise
# the dhcp server will provide its default lease time:
#send dhcp-lease-time 3600;
#
# define classless static route option
#
option rfc3442-classless-static-routes_raw code 121 = array of unsigned integer 8;
# Request several well known/usefull dhcp options.
request subnet-mask, broadcast-address, routers,
rfc3442-classless-static-routes_raw,
interface-mtu, host-name, domain-name,
domain-name-servers, nis-domain, nis-servers,
nds-context, nds-servers, nds-tree-name,
netbios-name-servers, netbios-dd-server,
netbios-node-type, netbios-scope, ntp-servers;
# We request above options, require only the IP configuration:
require subnet-mask;
# All another options (DNS, NTP, NIS, ...) are applied using
# netconfig(8) modules.
# To enforce the availability of the dns server list, set to:
#require subnet-mask, domain-name-servers;
timeout 60;
retry 60;
reboot 10;
select-timeout 5;
initial-interval 2;
++++++ dhclient6.conf ++++++
# Client configuration file example for DHCPv6
# The client side command to enable rapid-commit (2 packet exchange)
##send dhcp6.rapid-commit;
# name-servers and domain-search are requested by default.
# here is the way to request sip-servers-addresses too
also request dhcp6.sip-servers-addresses;
++++++ dhcp-4.1.1-default-paths.diff ++++++
diff --git a/includes/dhcpd.h b/includes/dhcpd.h
index 90f8a73..6fa5b9e 100644
--- a/includes/dhcpd.h
+++ b/includes/dhcpd.h
@@ -1285,11 +1285,11 @@ typedef unsigned char option_mask [16];
#endif /* DEBUG */
#ifndef _PATH_DHCPD_DB
-#define _PATH_DHCPD_DB LOCALSTATEDIR"/db/dhcpd.leases"
+#define _PATH_DHCPD_DB LOCALSTATEDIR"/lib/dhcp/db/dhcpd.leases"
#endif
#ifndef _PATH_DHCPD6_DB
-#define _PATH_DHCPD6_DB LOCALSTATEDIR"/db/dhcpd6.leases"
+#define _PATH_DHCPD6_DB LOCALSTATEDIR"/lib/dhcp6/db/dhcpd6.leases"
#endif
#ifndef _PATH_DHCPD_PID
@@ -1319,11 +1319,11 @@ typedef unsigned char option_mask [16];
#endif
#ifndef _PATH_DHCLIENT_DB
-#define _PATH_DHCLIENT_DB LOCALSTATEDIR"/db/dhclient.leases"
+#define _PATH_DHCLIENT_DB LOCALSTATEDIR"/lib/dhcp/dhclient.leases"
#endif
#ifndef _PATH_DHCLIENT6_DB
-#define _PATH_DHCLIENT6_DB LOCALSTATEDIR"/db/dhclient6.leases"
+#define _PATH_DHCLIENT6_DB LOCALSTATEDIR"/lib/dhcp6/dhclient6.leases"
#endif
#ifndef _PATH_RESOLV_CONF
++++++ dhcp-4.1.1-dhclient-exec-filedes.diff ++++++
diff --git a/client/dhclient.c b/client/dhclient.c
index 69dcc91..15c31a5 100644
--- a/client/dhclient.c
+++ b/client/dhclient.c
@@ -3173,6 +3173,12 @@ int script_go (client)
*/
if (leaseFile != NULL)
fclose(leaseFile);
+ if ((i = open("/dev/null", O_RDWR)) != -1) {
+ dup2(i, STDIN_FILENO);
+ dup2(i, STDOUT_FILENO);
+ if (i > STDERR_FILENO)
+ close(i);
+ }
execve (scriptName, argv, envp);
log_error ("execve (%s, ...): %m", scriptName);
exit (0);
++++++ dhcp-4.1.1-dhclient-no-libcrypto.diff ++++++
--- dhcp-4.1.1/configure.ac
+++ dhcp-4.1.1/configure.ac 2010/05/03 12:25:59
@@ -420,8 +420,13 @@ 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"
+AC_SUBST(CRYPTO_LIBS)
# Solaris needs some libraries for functions
AC_SEARCH_LIBS(socket, [socket])
++++++ dhcp-4.1.1-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();
@@ -653,12 +690,12 @@ static void usage()
log_error("Usage: dhclient %s %s",
#ifdef DHCPv6
- "[-4|-6] [-SNTP1dvrx] [-nw] [-p <port>]",
+ "[-4|-6] [-SNTP1dvrx] [-nw] [-H <hostname>] [-p <port>]",
#else /* DHCPv6 */
"[-1dvrx] [-nw] [-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.1.1-in6_pktinfo-prototype.diff ++++++
diff --git a/common/socket.c b/common/socket.c
index 036f7ae..6f56740 100644
--- a/common/socket.c
+++ b/common/socket.c
@@ -40,11 +40,16 @@
* I have implemented it under Linux; other systems should be doable also.
*/
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
#include "dhcpd.h"
#include
#include
#include
#include
+#include /* for struct in6_pktinfo, with glibc >= 2.10.1
+ _GNU_SOURCE required to enable it */
#ifdef USE_SOCKET_FALLBACK
# if !defined (USE_SOCKET_SEND)
++++++ dhcp-3.1.3-ldap-patch-mt-01.diff.bz2 -> dhcp-4.1.1-ldap-patch-mt-01.diff.bz2 ++++++
Files dhcp/dhcp-3.1.3-ldap-patch-mt-01.diff.bz2 and /mounts/work_src_done/STABLE/dhcp/dhcp-4.1.1-ldap-patch-mt-01.diff.bz2 differ
++++++ dhcp-4.1.1-man-includes.diff ++++++
diff --git a/dhcpctl/dhcpctl.3 b/dhcpctl/dhcpctl.3
index 2e1cb8a..ee44755 100644
--- a/dhcpctl/dhcpctl.3
+++ b/dhcpctl/dhcpctl.3
@@ -425,7 +425,7 @@ that most error checking has been ommitted for brevity.
#include
#include
-#include
+#include
#include
int main (int argc, char **argv) {
diff --git a/omapip/omapi.3 b/omapip/omapi.3
index 4673549..8e2503f 100644
--- a/omapip/omapi.3
+++ b/omapip/omapi.3
@@ -87,7 +87,7 @@ the lease ends.
#include
#include
- #include
+ #include
#include
int main (int argc, char **argv) {
++++++ dhcp-4.1.1-paranoia.diff ++++++
diff --git a/server/dhcpd.c b/server/dhcpd.c
index f0cacb6..6e30d33 100644
--- a/server/dhcpd.c
+++ b/server/dhcpd.c
@@ -210,7 +210,11 @@ static void omapi_listener_start (void *foo)
#if defined (PARANOIA)
/* to be used in one of two possible scenarios */
static void setup_chroot (char *chroot_dir) {
- if (geteuid())
+ /*
+ ** getuid() instead of geteuid(), see
+ ** comment by thomas@suse.de bellow
+ */
+ if (getuid())
log_fatal ("you must be root to use chroot");
if (chroot(chroot_dir)) {
@@ -402,7 +406,7 @@ main(int argc, char **argv) {
log_fatal ("Insufficient memory to %s %s: %s",
"record interface", argv [i],
isc_result_totext (result));
- strcpy (tmp -> name, argv [i]);
+ strncpy (tmp -> name, argv [i], sizeof(tmp->name)-1);
if (interfaces) {
interface_reference (&tmp -> next,
interfaces, MDL);
@@ -487,7 +491,15 @@ main(int argc, char **argv) {
if (set_user) {
struct passwd *tmp_pwd;
- if (geteuid())
+ /*
+ ** I query for the real UID and not for the effective UID
+ ** just to force the user to run this server as root and
+ ** not setting it suid. It should be a paranoia patch and
+ ** not a teletubbie patch. *eg*
+ ** Note: That the user is still able to set it suid! *zitter*
+ ** thomas@suse.de
+ */
+ if (getuid())
log_fatal ("you must be root to set user");
if (!(tmp_pwd = getpwnam(set_user)))
@@ -505,7 +517,10 @@ main(int argc, char **argv) {
#define group real_group
struct group *tmp_grp;
- if (geteuid())
+ /*
+ ** getuid() instead of geteuid(), see above
+ */
+ if (getuid())
log_fatal ("you must be root to set group");
if (!(tmp_grp = getgrnam(set_group)))
@@ -751,6 +766,7 @@ main(int argc, char **argv) {
/* change uid to the specified one */
if (set_gid) {
+ /* setgroups is done, OK */
if (setgroups (0, (void *)0))
log_fatal ("setgroups: %m");
if (setgid (set_gid))
++++++ dhcp-4.1.1-tmpfile.diff ++++++
diff --git a/server/db.c b/server/db.c
index a4e1558..1d5f5b0 100644
--- a/server/db.c
+++ b/server/db.c
@@ -1059,21 +1059,16 @@ int new_lease_file ()
db_validity = lease_file_is_corrupt;
- /* %Audit% Truncated filename causes panic. %2004.06.17,Safe%
- * This should never happen since the path is a configuration
- * variable from build-time or command-line. But if it should,
- * either by malice or ignorance, we panic, since the potential
- * for havoc is high.
- */
- if (snprintf (newfname, sizeof newfname, "%s.%d",
- path_dhcpd_db, (int)t) >= sizeof newfname)
- log_fatal("new_lease_file: lease file path too long");
-
- db_fd = open (newfname, O_WRONLY | O_TRUNC | O_CREAT, 0664);
+ snprintf (newfname, sizeof(newfname), "%s.XXXXXX", path_dhcpd_db);
+ db_fd = mkstemp (newfname);
if (db_fd < 0) {
log_error ("Can't create new lease file: %m");
return 0;
}
+ if (fchmod(db_fd, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) == -1) {
+ log_error ("Can't fchmod new lease file: %m");
+ goto fail;
+ }
if ((new_db_file = fdopen(db_fd, "w")) == NULL) {
log_error("Can't fdopen new lease file: %m");
close(db_fd);
++++++ dhcp-3.1-ESV.tar.bz2 -> dhcp-4.1.1.tar.bz2 ++++++
++++ 79887 lines of diff (skipped)
++++++ dhcpd.conf ++++++
# dhcpd.conf
#
# Sample configuration file for ISC dhcpd
#
# option definitions common to all supported networks...
option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;
default-lease-time 600;
max-lease-time 7200;
# if you do not use dynamical DNS updates:
#
# if you want to use dynamical DNS updates, you should first read
# read /usr/share/doc/packages/dhcp-server/DDNS-howto.txt
#
ddns-updates off;
# Use this to enble / disable dynamic dns updates globally.
ddns-update-style none;
# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
#authoritative;
# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;
#
# Define RFC 3442 classless static route option (121);
# the following _example_ routes:
# 192.168.2.254/32 via 0.0.0.0 (device route)
# 192.168.2.253/32 via 192.168.1.2 (255.255.255.255)
# 192.2.0.128/25 via 192.168.1.2 (255.255.255.128)
# 192.168.2.0/24 via 192.168.1.2 (255.255.255.0)
# 172.16.0.0/12 via 192.168.1.2 (255.240.0.0)
# 10.0.0.0/8 via 192.168.1.2 (255.0.0.0)
# default via 192.168.1.1
# have to be written as:
# option rfc3442-classless-static-routes
# 32, 192, 168, 2, 254, 0, 0, 0, 0,
# 32, 192, 168, 2, 253, 192, 168, 1, 2,
# 25, 192, 2, 0, 128, 192, 168, 1, 2,
# 24, 192, 168, 3, 192, 168, 1, 2,
# 12, 172, 16, 192, 168, 1, 2,
# 8, 10, 192, 168, 1, 2,
# 0, 192, 168, 1, 1;
#
# Note: you have to specify the default gateway here
# as well, because when classless routes are in use,
# the 'routers' option is ignored by the dhcp client.
#
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
# No service will be given on this subnet, but declaring it helps the
# DHCP server to understand the network topology.
subnet 10.152.187.0 netmask 255.255.255.0 {
}
# This is a very basic subnet declaration.
subnet 10.254.239.0 netmask 255.255.255.224 {
range 10.254.239.10 10.254.239.20;
option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
}
# This declaration allows BOOTP clients to get dynamic addresses,
# which we don't really recommend.
subnet 10.254.239.32 netmask 255.255.255.224 {
range dynamic-bootp 10.254.239.40 10.254.239.60;
option broadcast-address 10.254.239.31;
option routers rtr-239-32-1.example.org;
}
# A slightly different configuration for an internal subnet.
subnet 10.5.5.0 netmask 255.255.255.224 {
range 10.5.5.26 10.5.5.30;
option domain-name-servers ns1.internal.example.org;
option domain-name "internal.example.org";
option routers 10.5.5.1;
option broadcast-address 10.5.5.31;
default-lease-time 600;
max-lease-time 7200;
}
# Hosts which require special configuration options can be listed in
# host statements. If no address is specified, the address will be
# allocated dynamically (if possible), but the host-specific information
# will still come from the host declaration.
host passacaglia {
hardware ethernet 0:0:c0:5d:bd:95;
filename "vmunix.passacaglia";
server-name "toccata.fugue.com";
}
# Fixed IP addresses can also be specified for hosts. These addresses
# should not also be listed as being available for dynamic assignment.
# Hosts for which fixed IP addresses have been specified can boot using
# BOOTP or DHCP. Hosts for which no fixed address is specified can only
# be booted with DHCP, unless there is an address range on the subnet
# to which a BOOTP client is connected which has the dynamic-bootp flag
# set.
host fantasia {
hardware ethernet 08:00:07:26:c0:a5;
fixed-address fantasia.fugue.com;
}
# You can declare a class of clients and then do address allocation
# based on that. The example below shows a case where all clients
# in a certain class get addresses on the 10.17.224/24 subnet, and all
# other clients get addresses on the 10.0.29/24 subnet.
class "foo" {
match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
}
shared-network 224-29 {
subnet 10.17.224.0 netmask 255.255.255.0 {
option routers rtr-224.example.org;
}
subnet 10.0.29.0 netmask 255.255.255.0 {
option routers rtr-29.example.org;
}
pool {
allow members of "foo";
range 10.17.224.10 10.17.224.250;
}
pool {
deny members of "foo";
range 10.0.29.10 10.0.29.230;
}
}
++++++ dhcpd6.conf ++++++
# Server configuration file example for DHCPv6
# From the file used for TAHI tests.
#
# For more iformations about IPv6 addresses, see also:
# http://tools.ietf.org/html/rfc4193
# http://tools.ietf.org/html/rfc4291
# http://www.iana.org/assignments/ipv6-address-space/
#
# The addresses in the examples bellow are from the:
# FC00::/7 Unique Local Unicast [RFC4193]
# address space.
#
# Please allocate own prefix (6to4, tunnel broker) !
#
# IPv6 address valid lifetime
# (at the end the address is no longer usable by the client)
# (set to 30 days, the usual IPv6 default)
default-lease-time 2592000;
# IPv6 address preferred lifetime
# (at the end the address is deprecated, i.e., the client should use
# other addresses for new connections)
# (set to 7 days, the usual IPv6 default)
preferred-lifetime 604800;
# T1, the delay before Renew
# (default is 1/2 preferred lifetime)
# (set to 1 hour)
option dhcp-renewal-time 3600;
# T2, the delay before Rebind (if Renews failed)
# (default is 3/4 preferred lifetime)
# (set to 2 hours)
option dhcp-rebinding-time 7200;
# Enable RFC 5007 support (same than for DHCPv4)
allow leasequery;
# Global definitions for name server address(es) and domain search list
option dhcp6.name-servers fc00:501:ffff:100:200:ff:fe00:3f3e;
option dhcp6.domain-search "test.example.com","example.com";
# Set preference to 255 (maximum) in order to avoid waiting for
# additional servers when there is only one
##option dhcp6.preference 255;
# Server side command to enable rapid-commit (2 packet exchange)
##option dhcp6.rapid-commit;
# The delay before information-request refresh
# (minimum is 10 minutes, maximum one day, default is to not refresh)
# (set to 6 hours)
option dhcp6.info-refresh-time 21600;
# Static definition (must be global)
host myclient {
# The entry is looked up by this
host-identifier option
dhcp6.client-id 00:01:00:01:00:04:93:e0:00:00:00:00:a2:a2;
# A fixed address
fixed-address6 fc00:501:ffff:100::1234;
# A fixed prefix
fixed-prefix6 fc00:501:ffff:101::/64;
# Override of the global definitions,
# works only when a resource (address or prefix) is assigned
option dhcp6.name-servers fc00:501:ffff:100:200:ff:fe00:4f4e;
# For debug (to see when the entry statements are executed)
# (log "sol" when a matching Solicitation is received)
##if packet(0,1) = 1 { log(debug,"sol"); }
}
# The subnet where the server is attached
# (i.e., the server has an address in this subnet)
subnet6 fc00:501:ffff:100::/64 {
# Two addresses available to clients
# (the third client should get NoAddrsAvail)
range6 fc00:501:ffff:100::10 fc00:501:ffff:100::11;
# Use the whole /64 prefix for temporary addresses
# (i.e., direct application of RFC 4941)
range6 fc00:501:ffff:100:: temporary;
# Some /64 prefixes available for Prefix Delegation (RFC 3633)
prefix6 fc00:501:ffff:100:: fc00:501:ffff:111:: /64;
}
# A second subnet behind a relay agent
subnet6 fc00:501:ffff:101::/64 {
range6 fc00:501:ffff:101::10 fc00:501:ffff:101::11;
# Override of the global definitions,
# works only when a resource (address or prefix) is assigned
option dhcp6.name-servers fc00:501:ffff:101:200:ff:fe00:3f3e;
}
# A third subnet behind a relay agent chain
subnet6 fc00:501:ffff:102::/64 {
range6 fc00:501:ffff:102::10 fc00:501:ffff:102::11;
}
++++++ if-up.d.dhcpd-restart-hook ++++++
--- /var/tmp/diff_new_pack.9UkwTu/_old 2010-05-14 00:26:15.000000000 +0200
+++ /var/tmp/diff_new_pack.9UkwTu/_new 2010-05-14 00:26:15.000000000 +0200
@@ -57,6 +57,7 @@
. /etc/sysconfig/network/ifcfg-"$CONFIG" 2>/dev/null || true
: ${DHCPD_IFUP_RESTART:=auto}
+: ${DHCPD6_IFUP_RESTART:=auto}
iface_needs_restart()
{
@@ -65,17 +66,17 @@
-f /proc/net/vlan/$1
}
-case "$0" in
-*if-up.d*)
+dhcpv4_server_restart()
+{
#
# don't do anything if we are disabled either
# in the /etc/sysconfig/dhcpd or per interface
# in the /etc/sysconfig/network/ifcfg-"$CONFIG"
#
- test "$DHCPD_IFUP_RESTART" = no && exit 0
+ test "$DHCPD_IFUP_RESTART" = no && return 0
# don't restart for loopback interface
- case $INTERFACE in (lo) exit 0 ;; esac
+ case $INTERFACE in (lo) return 0 ;; esac
restart_needed=$DHCPD_IFUP_RESTART
if test -n "$DHCPD_INTERFACE" \
@@ -86,7 +87,7 @@
# don't restart when _one_ involved
# interface is not available/up yet
- is_iface_up $I || exit 0
+ is_iface_up $I || return 0
# check if this interface is involved
if test "$I" = "$INTERFACE" ; then
@@ -102,6 +103,50 @@
if test "$restart_needed" = yes ; then
/etc/init.d/dhcpd try-restart
fi
+}
+dhcpv6_server_restart()
+{
+ #
+ # don't do anything if we are disabled either
+ # in the /etc/sysconfig/dhcpd or per interface
+ # in the /etc/sysconfig/network/ifcfg-"$CONFIG"
+ #
+ test "$DHCPD6_IFUP_RESTART" = no && return 0
+
+ # don't restart for loopback interface
+ case $INTERFACE in (lo) return 0 ;; esac
+
+ restart_needed=$DHCPD6_IFUP_RESTART
+ if test -n "$DHCPD6_INTERFACE" \
+ -a "$restart_needed" != yes ;
+ then
+ for I in $DHCPD6_INTERFACE ; do
+ test -n "$I" || continue
+
+ # don't restart when _one_ involved
+ # interface is not available/up yet
+ is_iface_up $I || return 0
+
+ # check if this interface is involved
+ if test "$I" = "$INTERFACE" ; then
+
+ # check if a restart is needed
+ if iface_needs_restart $I ; then
+ restart_needed=yes
+ fi
+ fi
+ done
+ fi
+
+ if test "$restart_needed" = yes ; then
+ /etc/init.d/dhcpd6 try-restart
+ fi
+}
+
+case "$0" in
+*if-up.d*)
+ dhcpv4_server_restart
+ dhcpv6_server_restart
;;
*if-down.d*)
# don't do anything
++++++ rc.dhcpd ++++++
--- /var/tmp/diff_new_pack.9UkwTu/_old 2010-05-14 00:26:15.000000000 +0200
+++ /var/tmp/diff_new_pack.9UkwTu/_new 2010-05-14 00:26:15.000000000 +0200
@@ -2,63 +2,70 @@
# Copyright (c) 1996, 1997, 1998 S.u.S.E. GmbH
# Copyright (c) 1998, 1999, 2000, 2001 SuSE GmbH
# Copyright (c) 2002, 2003 SuSE Linux AG
+# Copyright (c) 2004-2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
-# Author: Rolf Haberrecker , 1997, 1998, 1999
-# Peter Poeml , 2000, 2001, 2002, 2003
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
#
-# /etc/init.d/dhcpd
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# Author: Rolf Haberrecker , 1997-1999
+# Peter Poeml , 2000-2006
+# Marius Tomaschewski , 2006-2010
+#
+# /etc/init.d/dhcp-server
# and its symbolic link
-# /usr/sbin/rcdhcpd
+# /usr/sbin/rcdhcp-server
#
### BEGIN INIT INFO
-# Provides: dhcpd
-# Required-Start: $network $remote_fs network-remotefs
-# Should-Start: $named $syslog $time ldap ndsd
-# Required-Stop: $network $remote_fs network-remotefs
-# Should-Stop: $named $syslog ldap ndsd
+# Provides: dhcp-server
+# Required-Start: $remote_fs $network
+# Should-Start: network-remotefs $named $syslog $time ldap ndsd
+# Required-Stop: $remote_fs $network
+# Should-Stop: network-remotefs $named $syslog ldap ndsd
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
-# Short-Description: DHCP Server
-# Description: Start DHCP (Dynamic Host Configuration Protocol)
-# server. (Note: if configured for failover it
+# Short-Description: ISC DHCP 4.x Server
+# Description: Start ISC DHCP (Dynamic Host Configuration Protocol)
+# 4.x series server.
+# (Note: if configured for failover it
# needs to rely on time synchronisation.)
### END INIT INFO
+test -s /etc/sysconfig/dhcpd && . /etc/sysconfig/dhcpd
-if [ -s /etc/sysconfig/dhcpd ]; then
-
- . /etc/sysconfig/dhcpd
-
-else
- # pre 8.0
-
- # Source SuSE config
- . /etc/rc.config
-
- test -s /etc/rc.config.d/dhcpd.rc.config && \
- . /etc/rc.config.d/dhcpd.rc.config
-
- # Determine the base and follow a runlevel link name.
- base=${0##*/}
- link=${base#*[SK][0-9][0-9]}
-
- # Force execution if not called by a runlevel directory.
- test $link = $base && START_DHCPD=yes
- test "$START_DHCPD" = yes || exit 0
-
-fi
+SUPPORTS_CHROOT="yes"
+SUPPORTS_RUN_AS="yes"
+SUPPORTS_HUP="no"
+DHCPDv_OPT=-4
+test "$SUPPORTS_CHROOT" = no && DHCPD_RUN_CHROOTED=no
+test "$SUPPORTS_RUN_AS" = no && DHCPD_RUN_AS=""
+test "$DHCPD_BINARY" = "/usr/sbin/dhcpd.lpf" -o \
+ "$DHCPD_BINARY" = "/usr/sbin/dhcpd.bsd" && \
+DHCPD_BINARY=/usr/sbin/dhcpd
-test "$DHCPD_RUN_CHROOTED" = "yes" && CHROOT_PREFIX=/var/lib/dhcp/
-DAEMON="DHCP server"
-[ "$DHCPD_BINARY" = /usr/sbin/dhcpd.lpf ] && DHCPD_BINARY=/usr/sbin/dhcpd
+DAEMON='ISC DHCPv4 4.x Server'
DAEMON_BIN=${DHCPD_BINARY:=/usr/sbin/dhcpd}
DAEMON_CONF=/etc/dhcpd.conf
+DAEMON_STATE=/var/lib/dhcp
+DAEMON_LEASES=dhcpd.leases
DAEMON_PIDFILE=/var/run/dhcpd.pid
STARTPROC_LOGFILE=/var/log/rc.dhcpd.log
-SUPPORTS_HUP="no"
LDAP_CONF=/etc/openldap/ldap.conf
+test "$DHCPD_RUN_CHROOTED" = "yes" && \
+CHROOT_PREFIX="$DAEMON_STATE" || CHROOT_PREFIX=''
+
# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
# rc_status check and set local and overall rc status
@@ -88,11 +95,15 @@
# with force-reload (in case signalling is not supported) are
# considered a success.
-if ! [ -x $DAEMON_BIN ]; then
+if ! [ -x "$DAEMON_BIN" ]; then
+ if [ "$1" = "stop" ]; then exit 0; fi
echo >&2 "$0: \"$DAEMON_BIN\" is not an executable file. Exiting."
- rc_failed 1
- rc_status -v1
- rc_exit
+ exit 5
+fi
+if ! [ -r "$DAEMON_CONF" ] ; then
+ if [ "$1" = "stop" ]; then exit 0; fi
+ echo >&2 "$0: \"$DAEMON_CONF\" config file missed. Exiting."
+ exit 6
fi
# remove empty pid files to avoid disturbing warnings by checkproc/killproc
@@ -117,7 +128,9 @@
## If the interfaces are not set, skip starting of dhcpd
## and return with "program not configured"
if [ -z "$DHCPD_INTERFACE" ]; then
- echo -n "... set DHCPD_INTERFACE in /etc/sysconfig/dhcpd"
+ var="DHCPD_INTERFACE"
+ case $DHCPDv_OPT in -6) var=DHCPD6_INTERFACE ;; esac
+ echo -n "... set $var in /etc/sysconfig/dhcpd"
# Tell the user this has skipped
rc_status -s
# service is not configured
@@ -128,7 +141,7 @@
DHCPD_INTERFACE=""
fi
- jail=/var/lib/dhcp; leases=dhcpd.leases
+ jail=${CHROOT_PREFIX:-${DAEMON_STATE}}; leases=$DAEMON_LEASES
if ! [ -e $jail/db/$leases ]; then
# until 9.0, the lease file was in /var/lib/dhcp and part of the package
if test -e $jail/$leases -a '!' -L $jail/$leases; then
@@ -150,7 +163,7 @@
if test "$DHCPD_RUN_CHROOTED" = "yes" ; then
## copy the conf file to the chroot jail (dhcpd has to be restarted anyway,
## when it has changed) and change path to leases file
- for i in $DAEMON_CONF $DHCPD_CONF_INCLUDE_FILES $LDAP_CONF; do
+ for i in $DAEMON_CONF $DHCPD_CONF_INCLUDE_FILES $LDAP_CONF /etc /dev; do
if test -d "${i}" ; then
test -d "$CHROOT_PREFIX/${i}" || \
mkdir -p "$CHROOT_PREFIX/${i}"
@@ -165,18 +178,19 @@
cp -aL "$i" "${CHROOT_PREFIX}/${i%/*}/" &>/dev/null \
|| { echo "...$0:$LINENO: could not copy $i to chroot jail"; rc_failed; rc_status -v1; exit 6; }
done
- libdir=$(basename $(echo /var/lib/dhcp/lib*))
+ libdir=$(basename $(echo ${CHROOT_PREFIX}/lib*))
if test -x /usr/bin/ldd ; then
get_ldd_deps()
{
ldd_wl="\/${libdir}\/lib"
ldd_bl="\/${libdir}\/libc\."
+ /usr/bin/ldd "$1" | \
while read -sr a b c d ; do
[ -n "$c" ] || continue
[[ $c =~ $ldd_wl ]] || continue
[[ $c =~ $ldd_bl ]] && continue
echo $c
- done < <(/usr/bin/ldd "$1")
+ done
}
else
get_ldd_deps() { :; }
@@ -191,11 +205,16 @@
done | sort -u`
for i in $cplibs ; do
if [ -s "$i" ]; then
- cp -pL "$i" "/var/lib/dhcp/$libdir/" \
+ cp -pL "$i" "${CHROOT_PREFIX}/$libdir/" \
|| { echo "...$0:$LINENO: could not copy $i to chroot jail"; rc_failed; rc_status -v1; exit 6; }
- fi
+ fi
done
- DHCPD_ARGS="-chroot $CHROOT_PREFIX -lf /db/dhcpd.leases"
+
+ # mount /proc into the chroot; the server fails if unable to read /proc/net/{dev,if_inet6}
+ mkdir -p ${CHROOT_PREFIX}/proc
+ mount -t proc -o ro proc ${CHROOT_PREFIX}/proc 2>/dev/null
+
+ DHCPD_ARGS="-chroot $CHROOT_PREFIX -lf /db/$DAEMON_LEASES"
## If there is a pid file containing a pid, the machine might have crashed. pid files in
## /var/run are always cleaned up at boot time, but this is not the case for the pid file in
@@ -203,26 +222,32 @@
## incidentally contains the pid of a running process. If this process is not a 'dhcpd',
## 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
- i=$(<$CHROOT_PREFIX/$DAEMON_PIDFILE)
- if pidof dhcpd &>/dev/null; then
- echo -n "(already running) "
- else
+ p=$(<$CHROOT_PREFIX/$DAEMON_PIDFILE)
+ if test -n "$p" && grep -qE "^${DAEMON_BIN}" "/proc/$p/cmdline" ; then
+ echo -n '(already running) '
+ else
rm $CHROOT_PREFIX/$DAEMON_PIDFILE
fi
fi
-
+ else
+ DHCPD_ARGS="-lf ${DAEMON_STATE}/db/$DAEMON_LEASES"
fi
if [ -n "$DHCPD_RUN_AS" ]; then
DHCPD_RUN_AS_GROUP="$(getent group $(getent passwd $DHCPD_RUN_AS | cut -d: -f4) | cut -d: -f1)"
DHCPD_ARGS="$DHCPD_ARGS -user $DHCPD_RUN_AS -group $DHCPD_RUN_AS_GROUP"
+
+ if test "$DHCPD_RUN_CHROOTED" = "yes" ; then
+ chown "${DHCPD_RUN_AS}:${DHCPD_RUN_AS_GROUP}" \
+ "$CHROOT_PREFIX/${DAEMON_PIDFILE%/*}"
+ fi
fi
## check syntax with -t (output to log file) and start only when the syntax is okay
rm -f $STARTPROC_LOGFILE # start log
error=0
- if ! $DAEMON_BIN -t -cf $CHROOT_PREFIX/$DAEMON_CONF > $STARTPROC_LOGFILE 2>&1 ; then
+ if ! $DAEMON_BIN $DHCPDv_OPT -t -cf $CHROOT_PREFIX/$DAEMON_CONF -pf $DAEMON_PIDFILE > $STARTPROC_LOGFILE 2>&1 ; then
error=1
else
## Start daemon. If this fails the return value is set appropriate.
@@ -230,9 +255,9 @@
## to match the LSB spec.
test "$2" = "-v" && echo -en \
- "\nexecuting '$DAEMON_BIN $DHCPD_ARGS $DHCPD_OTHER_ARGS $DHCPD_INTERFACE'"
+ "\nexecuting '$DAEMON_BIN $DHCPDv_OPT -cf $DAEMON_CONF -pf $DAEMON_PIDFILE $DHCPD_ARGS $DHCPD_OTHER_ARGS $DHCPD_INTERFACE'"
- $DAEMON_BIN $DHCPD_ARGS $DHCPD_OTHER_ARGS $DHCPD_INTERFACE &> $STARTPROC_LOGFILE
+ $DAEMON_BIN $DHCPDv_OPT -cf $DAEMON_CONF -pf $DAEMON_PIDFILE $DHCPD_ARGS $DHCPD_OTHER_ARGS $DHCPD_INTERFACE &> $STARTPROC_LOGFILE
ret=$?
fi
@@ -259,9 +284,10 @@
kill $(<$CHROOT_PREFIX/$DAEMON_PIDFILE) 2>/dev/null
fi
- # remove libraries from the chroot jail, just so they are not left over
- # if the server is deinstalled
- if [ "$DHCPD_RUN_CHROOTED" = yes ]; then
+ # umount proc and remove libraries from the chroot jail,
+ # so they are not left over if the server is deinstalled
+ if [ "$DHCPD_RUN_CHROOTED" = yes -a -n "$CHROOT_PREFIX" ]; then
+ umount ${CHROOT_PREFIX}/proc 2>/dev/null
rm -f $CHROOT_PREFIX/lib*/*
fi
@@ -300,8 +326,8 @@
echo -n "Reload service $DAEMON"
if [ "$SUPPORTS_HUP" = "yes" ]; then
- killproc -p $DAEMON_PIDFILE -HUP $DAEMON_BIN
- #touch $DAEMON_PIDFILE
+ killproc -p $CHROOT_PREFIX/$DAEMON_PIDFILE -HUP $DAEMON_BIN
+ #touch $CHROOT_PREFIX/$DAEMON_PIDFILE
rc_status -v
else
$0 stop && sleep 3 && $0 start
@@ -315,8 +341,8 @@
echo -n "Reload service $DAEMON"
if [ "$SUPPORTS_HUP" = "yes" ]; then
# If it supports signalling:
- killproc -p $DAEMON_PIDFILE -HUP $DAEMON_BIN
- #touch $DAEMON_PIDFILE
+ killproc -p $CHROOT_PREFIX/$DAEMON_PIDFILE -HUP $DAEMON_BIN
+ #touch $CHROOT_PREFIX/$DAEMON_PIDFILE
rc_status -v
else
## Otherwise if it does not support reload:
@@ -354,10 +380,10 @@
## this nice bit is from Edwin Groothuis:
## check syntax (quiet)
- $DAEMON_BIN -q -t -cf $DAEMON_CONF
+ $DAEMON_BIN $DHCPDv_OPT -q -t -cf $DAEMON_CONF
if ! [ $? -eq 0 ]; then
## check syntax (verbose)
- $DAEMON_BIN -t -cf $DAEMON_CONF
+ $DAEMON_BIN $DHCPDv_OPT -t -cf $DAEMON_CONF
echo -e '\nConfig is NOT okay\n'
else
echo 'Config is okay. Hope you also specified existent network devices ;) '
@@ -365,10 +391,10 @@
## in v3, lease file checking is also implemented
if [ $DAEMON_BIN != "/usr/sbin/dhcpd-2" ]; then
## check leases file (quiet)
- $DAEMON_BIN -q -T -cf $DAEMON_CONF -lf /var/lib/dhcp/db/dhcpd.leases
+ $DAEMON_BIN $DHCPDv_OPT -q -T -cf $DAEMON_CONF -lf ${DAEMON_STATE}/db/$DAEMON_LEASES
if ! [ $? -eq 0 ]; then
## check leases file (verbose)
- $DAEMON_BIN -T -cf $DAEMON_CONF -lf /var/lib/dhcp/db/dhcpd.leases
+ $DAEMON_BIN $DHCPDv_OPT -T -cf $DAEMON_CONF -lf ${DAEMON_STATE}/db/$DAEMON_LEASES
echo -e '\nLease file is NOT okay'
else
echo 'Lease file is okay'
++++++ rc.dhcpd6 ++++++
#! /bin/bash
# Copyright (c) 1996, 1997, 1998 S.u.S.E. GmbH
# Copyright (c) 1998, 1999, 2000, 2001 SuSE GmbH
# Copyright (c) 2002, 2003 SuSE Linux AG
# Copyright (c) 2004-2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
#
# Author: Rolf Haberrecker , 1997-1999
# Peter Poeml , 2000-2006
# Marius Tomaschewski , 2006-2010
#
# /etc/init.d/dhcp-server
# and its symbolic link
# /usr/sbin/rcdhcp-server
#
### BEGIN INIT INFO
# Provides: dhcp6-server
# Required-Start: $remote_fs $network
# Should-Start: network-remotefs $named $syslog $time ldap ndsd
# Required-Stop: $remote_fs $network
# Should-Stop: network-remotefs $named $syslog ldap ndsd
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: ISC DHCP 4.x Server
# Description: Start ISC DHCP (Dynamic Host Configuration Protocol)
# 4.x series server.
# (Note: if configured for failover it
# needs to rely on time synchronisation.)
### END INIT INFO
test -s /etc/sysconfig/dhcpd && . /etc/sysconfig/dhcpd
SUPPORTS_CHROOT="yes"
SUPPORTS_RUN_AS="yes"
SUPPORTS_HUP="no"
DHCPDv_OPT=-6
DHCPD_RUN_CHROOTED=$DHCPD6_RUN_CHROOTED
DHCPD_RUN_AS=$DHCPD6_RUN_AS
DHCPD_BINARY=$DHCPD6_BINARY
DHCPD_INTERFACE=$DHCPD6_INTERFACE
DHCPD_CONF_INCLUDE_FILES=$DHCPD6_CONF_INCLUDE_FILES
DHCPD_OTHER_ARGS=$DHCPD6_OTHER_ARGS
test "$SUPPORTS_CHROOT" = no && DHCPD_RUN_CHROOTED=no
test "$SUPPORTS_RUN_AS" = no && DHCPD_RUN_AS=""
DAEMON='ISC DHCPv6 4.x Server'
DAEMON_BIN=${DHCPD_BINARY:=/usr/sbin/dhcpd6}
DAEMON_CONF=/etc/dhcpd6.conf
DAEMON_STATE=/var/lib/dhcp6
DAEMON_LEASES=dhcpd6.leases
DAEMON_PIDFILE=/var/run/dhcpd6.pid
STARTPROC_LOGFILE=/var/log/rc.dhcpd6.log
LDAP_CONF=
test "$DHCPD_RUN_CHROOTED" = "yes" && \
CHROOT_PREFIX="$DAEMON_STATE" || CHROOT_PREFIX=''
# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
# rc_status check and set local and overall rc status
# rc_status -v ditto but be verbose in local rc status
# rc_status -v -r ditto and clear the local rc status
# rc_failed set local and overall rc status to failed
# rc_failed <num> set local and overall rc status to <num><num>
# rc_reset clear local rc status (overall remains)
# rc_exit exit appropriate to overall rc status
. /etc/rc.status
# First reset status of this service
rc_reset
# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - insufficient privilege
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
#
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signalling is not supported) are
# 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
fi
if ! [ -r "$DAEMON_CONF" ] ; then
if [ "$1" = "stop" ]; then exit 0; fi
echo >&2 "$0: \"$DAEMON_CONF\" config file missed. Exiting."
exit 6
fi
# remove empty pid files to avoid disturbing warnings by checkproc/killproc
# (these can occur if dhcpd does not start correctly)
test -e $DAEMON_PIDFILE && ! test -s $DAEMON_PIDFILE && rm $DAEMON_PIDFILE
test -e $CHROOT_PREFIX/$DAEMON_PIDFILE && ! test -s $CHROOT_PREFIX/$DAEMON_PIDFILE && rm $CHROOT_PREFIX/$DAEMON_PIDFILE
case "$1" in
start)
echo -n "Starting $DAEMON "
## If there is no conf file, skip starting of dhcpd
## and return with "program not configured"
if ! [ -f $DAEMON_CONF ]; then
echo -n "... no configuration file found";
# Tell the user this has skipped
rc_status -s
# service is not configured
exit 6;
fi
## If the interfaces are not set, skip starting of dhcpd
## and return with "program not configured"
if [ -z "$DHCPD_INTERFACE" ]; then
var="DHCPD_INTERFACE"
case $DHCPDv_OPT in -6) var=DHCPD6_INTERFACE ;; esac
echo -n "... set $var in /etc/sysconfig/dhcpd"
# Tell the user this has skipped
rc_status -s
# service is not configured
exit 6;
fi
if [ "$DHCPD_INTERFACE" = "ANY" ]; then
DHCPD_INTERFACE=""
fi
jail=${CHROOT_PREFIX:-${DAEMON_STATE}}; leases=$DAEMON_LEASES
if ! [ -e $jail/db/$leases ]; then
# until 9.0, the lease file was in /var/lib/dhcp and part of the package
if test -e $jail/$leases -a '!' -L $jail/$leases; then
# this is the case where the %post script runs _before_ the old package is
# removed (i.e., dhcpd.leases has not renamed to .rpmsave yet)
mv $jail/$leases $jail/db/$leases && \
ln -s db/$leases $jail/
elif test -e $jail/$leases.rpmsave; then
# this is what's left when the package is already gone.
mv $jail/$leases.rpmsave $jail/db/$leases && \
ln -s db/$leases $jail/
else
# fresh installation:
# a lease file must be present. the server won't start without
touch $jail/db/$leases
fi
fi
if test "$DHCPD_RUN_CHROOTED" = "yes" ; then
## copy the conf file to the chroot jail (dhcpd has to be restarted anyway,
## when it has changed) and change path to leases file
for i in $DAEMON_CONF $DHCPD_CONF_INCLUDE_FILES $LDAP_CONF /etc /dev; do
if test -d "${i}" ; then
test -d "$CHROOT_PREFIX/${i}" || \
mkdir -p "$CHROOT_PREFIX/${i}"
elif test -e "${i}" ; then
test -d "$CHROOT_PREFIX/${i%/*}" || \
mkdir -p "$CHROOT_PREFIX/${i%/*}"
fi
done
rm -f $CHROOT_PREFIX/dev/urandom
for i in $DAEMON_CONF $DHCPD_CONF_INCLUDE_FILES $LDAP_CONF /etc/{gai.conf,nsswitch.conf,resolv.conf,host.conf,hosts,localtime} /dev/urandom; do
if ! test -e "$i"; then continue; fi # neither of them is absolutely necessary
cp -aL "$i" "${CHROOT_PREFIX}/${i%/*}/" &>/dev/null \
|| { echo "...$0:$LINENO: could not copy $i to chroot jail"; rc_failed; rc_status -v1; exit 6; }
done
libdir=$(basename $(echo ${CHROOT_PREFIX}/lib*))
if test -x /usr/bin/ldd ; then
get_ldd_deps()
{
ldd_wl="\/${libdir}\/lib"
ldd_bl="\/${libdir}\/libc\."
/usr/bin/ldd "$1" | \
while read -sr a b c d ; do
[ -n "$c" ] || continue
[[ $c =~ $ldd_wl ]] || continue
[[ $c =~ $ldd_bl ]] && continue
echo $c
done
}
else
get_ldd_deps() { :; }
fi
cplibs=`for i in /$libdir/{libresolv.so.*,libnss_*.so.*} \
/$libdir/{libpthread.so.0,libdl.so.2} ;
do
if [ -s "$i" ] ; then
echo "$i"
get_ldd_deps "$i"
fi
done | sort -u`
for i in $cplibs ; do
if [ -s "$i" ]; then
cp -pL "$i" "${CHROOT_PREFIX}/$libdir/" \
|| { echo "...$0:$LINENO: could not copy $i to chroot jail"; rc_failed; rc_status -v1; exit 6; }
fi
done
# mount /proc into the chroot; the server fails if unable to read /proc/net/{dev,if_inet6}
mkdir -p ${CHROOT_PREFIX}/proc
mount -t proc -o ro proc ${CHROOT_PREFIX}/proc 2>/dev/null
DHCPD_ARGS="-chroot $CHROOT_PREFIX -lf /db/$DAEMON_LEASES"
## If there is a pid file containing a pid, the machine might have crashed. pid files in
## /var/run are always cleaned up at boot time, but this is not the case for the pid file in
## the chroot jail. Therefore, and old pid file may exist. This is only a problem if it
## incidentally contains the pid of a running process. If this process is not a 'dhcpd',
## 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
echo -n '(already running) '
else
rm $CHROOT_PREFIX/$DAEMON_PIDFILE
fi
fi
else
DHCPD_ARGS="-lf ${DAEMON_STATE}/db/$DAEMON_LEASES"
fi
if [ -n "$DHCPD_RUN_AS" ]; then
DHCPD_RUN_AS_GROUP="$(getent group $(getent passwd $DHCPD_RUN_AS | cut -d: -f4) | cut -d: -f1)"
DHCPD_ARGS="$DHCPD_ARGS -user $DHCPD_RUN_AS -group $DHCPD_RUN_AS_GROUP"
if test "$DHCPD_RUN_CHROOTED" = "yes" ; then
chown "${DHCPD_RUN_AS}:${DHCPD_RUN_AS_GROUP}" \
"$CHROOT_PREFIX/${DAEMON_PIDFILE%/*}"
fi
fi
## check syntax with -t (output to log file) and start only when the syntax is okay
rm -f $STARTPROC_LOGFILE # start log
error=0
if ! $DAEMON_BIN $DHCPDv_OPT -t -cf $CHROOT_PREFIX/$DAEMON_CONF -pf $DAEMON_PIDFILE > $STARTPROC_LOGFILE 2>&1 ; then
error=1
else
## Start daemon. If this fails the return value is set appropriate.
## The init script should return 0, even if service is already running,
## to match the LSB spec.
test "$2" = "-v" && echo -en \
"\nexecuting '$DAEMON_BIN $DHCPDv_OPT -cf $DAEMON_CONF -pf $DAEMON_PIDFILE $DHCPD_ARGS $DHCPD_OTHER_ARGS $DHCPD_INTERFACE'"
$DAEMON_BIN $DHCPDv_OPT -cf $DAEMON_CONF -pf $DAEMON_PIDFILE $DHCPD_ARGS $DHCPD_OTHER_ARGS $DHCPD_INTERFACE &> $STARTPROC_LOGFILE
ret=$?
fi
if [ $error -gt 0 -o ${ret:-0} -gt 0 ]; then
cat $STARTPROC_LOGFILE
## set status to failed
rc_failed
else
[ "$DHCPD_RUN_CHROOTED" = "yes" ] && echo -n "[chroot]" || :
fi
# Remember status and be verbose
rc_status -v
;;
stop)
echo -n "Shutting down $DAEMON "
## Stop daemon with killproc(8) and if this fails
## set echo the echo return value.
killproc -p $CHROOT_PREFIX/$DAEMON_PIDFILE -TERM $DAEMON_BIN
ret=$?
if test -s $CHROOT_PREFIX/$DAEMON_PIDFILE; then
kill $(<$CHROOT_PREFIX/$DAEMON_PIDFILE) 2>/dev/null
fi
# umount proc and remove libraries from the chroot jail,
# so they are not left over if the server is deinstalled
if [ "$DHCPD_RUN_CHROOTED" = yes -a -n "$CHROOT_PREFIX" ]; then
umount ${CHROOT_PREFIX}/proc 2>/dev/null
rm -f $CHROOT_PREFIX/lib*/*
fi
# Remember status and be verbose
rc_failed $ret
rc_status -v
;;
try-restart)
## Do a restart only if the service was active before.
## Note: try-restart is now part of LSB (as of 1.9).
## RH has a similar command named condrestart.
$0 status
if test $? = 0; then
$0 restart
else
rc_reset # Not running is not a failure.
fi
# Remember status and be quiet
rc_status
;;
restart)
## Stop the service and regardless of whether it was
## running or not, start it again.
$0 stop
sleep 3
$0 start
# Remember status and be quiet
rc_status
;;
force-reload)
## Signal the daemon to reload its config. Most daemons
## do this on signal 1 (SIGHUP).
## If it does not support it, restart.
echo -n "Reload service $DAEMON"
if [ "$SUPPORTS_HUP" = "yes" ]; then
killproc -p $CHROOT_PREFIX/$DAEMON_PIDFILE -HUP $DAEMON_BIN
#touch $CHROOT_PREFIX/$DAEMON_PIDFILE
rc_status -v
else
$0 stop && sleep 3 && $0 start
rc_status
fi
;;
reload)
## Like force-reload, but if daemon does not support
## signalling, do nothing (!)
echo -n "Reload service $DAEMON"
if [ "$SUPPORTS_HUP" = "yes" ]; then
# If it supports signalling:
killproc -p $CHROOT_PREFIX/$DAEMON_PIDFILE -HUP $DAEMON_BIN
#touch $CHROOT_PREFIX/$DAEMON_PIDFILE
rc_status -v
else
## Otherwise if it does not support reload:
rc_failed 3
rc_status -v
fi
;;
status)
echo -n "Checking for $DAEMON: "
## Check status with checkproc(8), if process is running
## checkproc will return with exit status 0.
# Status has a slightly different for the status command:
# 0 - service running
# 1 - service dead, but /var/run/ pid file exists
# 2 - service dead, but /var/lock/ lock file exists
# 3 - service not running
# NOTE: checkproc returns LSB compliant status values.
checkproc -p $CHROOT_PREFIX/$DAEMON_PIDFILE $DAEMON_BIN
rc_status -v
;;
probe)
## Optional: Probe for the necessity of a reload,
## give out the argument which is required for a reload.
rc=0
for i in /etc/sysconfig/dhcpd $DAEMON_CONF $DHCPD_CONF_INCLUDE_FILES; do
test $i -nt $CHROOT_PREFIX/$DAEMON_PIDFILE && rc=1
done
test $rc = 1 && echo restart
;;
check-syntax|syntax-check)
echo "Checking syntax of $DAEMON_CONF: "
## this nice bit is from Edwin Groothuis:
## check syntax (quiet)
$DAEMON_BIN $DHCPDv_OPT -q -t -cf $DAEMON_CONF
if ! [ $? -eq 0 ]; then
## check syntax (verbose)
$DAEMON_BIN $DHCPDv_OPT -t -cf $DAEMON_CONF
echo -e '\nConfig is NOT okay\n'
else
echo 'Config is okay. Hope you also specified existent network devices ;) '
## in v3, lease file checking is also implemented
if [ $DAEMON_BIN != "/usr/sbin/dhcpd-2" ]; then
## check leases file (quiet)
$DAEMON_BIN $DHCPDv_OPT -q -T -cf $DAEMON_CONF -lf ${DAEMON_STATE}/db/$DAEMON_LEASES
if ! [ $? -eq 0 ]; then
## check leases file (verbose)
$DAEMON_BIN $DHCPDv_OPT -T -cf $DAEMON_CONF -lf ${DAEMON_STATE}/db/$DAEMON_LEASES
echo -e '\nLease file is NOT okay'
else
echo 'Lease file is okay'
fi
fi
fi
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe|check-syntax} [-v]"
exit 1
esac
rc_exit
++++++ rc.dhcrelay ++++++
--- /var/tmp/diff_new_pack.9UkwTu/_old 2010-05-14 00:26:15.000000000 +0200
+++ /var/tmp/diff_new_pack.9UkwTu/_new 2010-05-14 00:26:15.000000000 +0200
@@ -2,8 +2,10 @@
# Copyright (c) 1996, 1997, 1998 S.u.S.E. GmbH
# Copyright (c) 1998, 1999, 2000, 2001 SuSE GmbH
# Copyright (c) 2002 SuSE Linux AG
+# Copyright (c) 2003-2010 SUSE LINUX Products GmbH
#
# Author: Peter Poeml , 2001
+# Marius Tomaschewski , 2010
#
# /etc/init.d/dhcrelay
# and its symbolic link
@@ -18,23 +20,23 @@
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: DHCP Relay
-# Description: Start DHCP (Dynamic Host Configuration Protocol)
-# gateway, relaying DHCP requests from one
-# physical network segment to another.
+# Description: Start DHCP (Dynamic Host Configuration Protocol)
+# relay agent, forwarding DHCP requests from one
+# physical network segment to another.
### END INIT INFO
-
-test -s /etc/sysconfig/dhcrelay && \
- . /etc/sysconfig/dhcrelay
-
-DAEMON="dhcp relay agent"
+DAEMON="ISC DHCPv4 relay agent"
DAEMON_BIN=/usr/sbin/dhcrelay
DAEMON_CONF=/etc/sysconfig/dhcrelay
DAEMON_PIDFILE=/var/run/dhcrelay.pid
STARTPROC_LOGFILE=/var/log/rc.dhcrelay.log
SUPPORTS_HUP="no"
-test -x $DAEMON_BIN || exit 5
+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
+}
# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
++++++ sysconfig.dhcpd ++++++
--- /var/tmp/diff_new_pack.9UkwTu/_old 2010-05-14 00:26:15.000000000 +0200
+++ /var/tmp/diff_new_pack.9UkwTu/_new 2010-05-14 00:26:15.000000000 +0200
@@ -1,24 +1,38 @@
## Path: Network/DHCP/DHCP server
-## Description: DHCP server settings
+## Description: DHCPv4 server settings
## Type: string
## Default: ""
## ServiceRestart: dhcpd
#
-# Interface(s) for the DHCP server to listen on.
+# Interface(s) for the DHCPv4 server to listen on.
#
# A special keyword is ANY, it will cause dhcpd to autodetect available
# interfaces.
#
-# Examples: DHCPD_INTERFACE="eth0"
-# DHCPD_INTERFACE="eth0 eth1 eth2 tr0 wlan0"
-# DHCPD_INTERFACE="internal0 internal1"
+# Examples: DHCPD_INTERFACE="eth0 eth1 eth2"
# DHCPD_INTERFACE="ANY"
#
DHCPD_INTERFACE=""
+## Path: Network/DHCP/DHCP server
+## Description: DHCPv6 server settings
+## Type: string
+## Default: ""
+## ServiceRestart: dhcpd6
+#
+# Interface(s) for the DHCPv6 server to listen on.
+#
+# A special keyword is ANY, it will cause dhcpd to autodetect available
+# interfaces.
+#
+# Examples: DHCPD6_INTERFACE="eth0 eth1 eth2"
+# DHCPD6_INTERFACE="ANY"
+#
+DHCPD6_INTERFACE=""
+
## Type: list(yes,no,auto,)
## Default:
-## Description: Restart dhcp server when interface goes up (again)
+## Description: Restart dhcpv4 server when interface goes up (again)
#
# When the dhcp server is listening on a virtual interface, e.g. bridge,
# bonding or vlan, and this interface gets deleted and recreated during
@@ -38,6 +52,28 @@
#
DHCPD_IFUP_RESTART=""
+## Type: list(yes,no,auto,)
+## Default:
+## Description: Restart dhcpv6 server when interface goes up (again)
+#
+# When the dhcp server is listening on a virtual interface, e.g. bridge,
+# bonding or vlan, and this interface gets deleted and recreated during
+# a network restart, dhcpd will stop answering requests on this interface
+# and needs a restart as well.
+# Begining with SLE-10 SP3, we install an if-up.d post script (see ifup(8)
+# and also ifservices(5)), enabled in auto mode by default. This variable
+# can be used to force or avoid the dhcp server restart:
+#
+# no: do not restart dhcpd
+# yes: force a dhcp server restart
+# auto: (default) restart for virtual interfaces (bond,bridge,vlan) when
+# all interfaces used in DHCPD_INTERFACE variable are up as well.
+#
+# Except of this global setting, the variable can be specified per interface
+# in the interface configurations (/etc/sysconfig/network/ifcfg-$name).
+#
+DHCPD6_IFUP_RESTART=""
+
## Type: yesno
## Default: yes
## ServiceRestart: dhcpd
@@ -57,6 +93,25 @@
#
DHCPD_RUN_CHROOTED="yes"
+## Type: yesno
+## Default: yes
+## ServiceRestart: dhcpd6
+#
+# Shall the DHCP server dhcpd run in a chroot jail (/var/lib/dhcp)?
+#
+# Each time you start dhcpd with the init script, /etc/dhcpd.conf will
+# be copied to /var/lib/dhcp/etc/.
+#
+# Some files that are important for hostname to IP address resolution
+# (/etc/{gai.conf,nsswitch.conf,resolv.conf,host.conf,hosts,localtime},
+# /lib/lib{resolv.so.*,libnss_*.so.*,libpthread.so.0,libdl.so.2}) will
+# also be copied to the chroot jail by the init script when you start
+# it (less than 1MB altogether).
+#
+# The pid file will be in /var/lib/dhcp/var/run/dhcpd.pid.
+#
+DHCPD6_RUN_CHROOTED="yes"
+
## Type: string
## Default: ""
## ServiceRestart: dhcpd
@@ -74,6 +129,22 @@
DHCPD_CONF_INCLUDE_FILES=""
## Type: string
+## Default: ""
+## ServiceRestart: dhcpd6
+#
+# Since version 3, dhcpd.conf can contain include statements.
+# If you enter the names of any include files here, _all_ conf
+# files will be copied to $chroot/etc/, when dhcpd is started in the
+# chroot jail. (/etc/dhcpd.conf is always copied.)
+#
+# For your convenience, you can also specify entire directories, like
+# "/etc/dhcpd.conf.d".
+#
+# Example: "/etc/dhcpd.conf.shared /etc/dhcpd.conf.bootp-clients"
+#
+DHCPD6_CONF_INCLUDE_FILES=""
+
+## Type: string
## Default: "dhcpd"
## ServiceRestart: dhcpd
#
@@ -83,6 +154,15 @@
DHCPD_RUN_AS="dhcpd"
## Type: string
+## Default: "dhcpd"
+## ServiceRestart: dhcpd6
+#
+# Leave empty or enter "root" to let dhcpd run as root.
+# Enter "dhcpd" to run dhcpd as user 'dhcpd'.
+#
+DHCPD6_RUN_AS="dhcpd"
+
+## Type: string
## Default: ""
## ServiceRestart: dhcpd
#
@@ -93,6 +173,15 @@
## Type: string
## Default: ""
+## ServiceRestart: dhcpd6
+#
+# Other arguments that you want dhcpd to be started with
+# (e.g. "-p 1234" for a non-standard port to listen on)
+#
+DHCPD6_OTHER_ARGS=""
+
+## Type: string
+## Default: ""
## ServiceRestart: dhcpd
#
# You may specify another dhcpd binary to be run.
@@ -102,3 +191,14 @@
#
DHCPD_BINARY=""
+## Type: string
+## Default: ""
+## ServiceRestart: dhcpd6
+#
+# You may specify another dhcpd binary to be run.
+# The full path needs to be specified.
+#
+# If empty, the default applies.
+#
+DHCPD6_BINARY=""
+
++++++ sysconfig.dhcrelay ++++++
--- /var/tmp/diff_new_pack.9UkwTu/_old 2010-05-14 00:26:15.000000000 +0200
+++ /var/tmp/diff_new_pack.9UkwTu/_new 2010-05-14 00:26:15.000000000 +0200
@@ -4,11 +4,9 @@
## Default: ""
## ServiceRestart: dhcrelay
#
-# Interface(s) for DHCP relay agent to listen on
+# Interface(s) for DHCPv4 relay agent to listen on
#
-# Examples: DHCPD_INTERFACE="eth0"
-# DHCPD_INTERFACE="eth0 eth1 eth2 tr0 wlan0"
-# DHCPD_INTERFACE="internal0 internal1"
+# Example: DHCPD_INTERFACE="eth0 eth1 eth2 wlan0"
#
DHCRELAY_INTERFACES=""
@@ -16,7 +14,7 @@
## Default: ""
## ServiceRestart: dhcrelay
#
-# DHCP servers to be used by DHCP relay agent
+# DHCPv4 servers to be used by DHCPv4 relay agent
# (separated by spaces, e.g. "192.168.0.11 191.168.0.12")
#
DHCRELAY_SERVERS=""
@@ -25,8 +23,37 @@
## Default: ""
## ServiceRestart: dhcrelay
#
-# Additional options
+# Additional DHCPv4 relay start options
# Example: "-c 8"
#
DHCRELAY_OPTIONS=""
+## Type: string
+## Default: ""
+## ServiceRestart: dhcrelay6
+#
+# Specifies the ``lower'' network interface for DHCPv6 relay mode
+# separated by spaces.
+# The format of the lower interface is: "[address%]ifname[#index]".
+#
+DHCRELAY6_LOWER_INTERFACES_ARGS=""
+
+## Type: string
+## Default: ""
+## ServiceRestart: dhcrelay6
+#
+# Specifies the ``upper'' network interface for DHCPv6 relay mode
+# separated by spaces.
+# The format of the upper interface is "[address%]ifname".
+#
+DHCRELAY6_UPPER_INTERFACES_ARGS=""
+
+## Type: string
+## Default: ""
+## ServiceRestart: dhcrelay6
+#
+# Additional DHCPv6 relay start options
+# Example: "-c 8 -I"
+#
+DHCRELAY6_OPTIONS=""
+
++++++ sysconfig.syslog-dhcpd ++++++
--- /var/tmp/diff_new_pack.9UkwTu/_old 2010-05-14 00:26:15.000000000 +0200
+++ /var/tmp/diff_new_pack.9UkwTu/_new 2010-05-14 00:26:15.000000000 +0200
@@ -3,10 +3,24 @@
## ServiceRestart: syslog
#
# The filename mentioned here will be added with the "-a ..." option as
-# additional socket via SYSLOGD_PARAMS when syslogd is started.
+# additional socket via SYSLOGD_PARAMS when syslogd is started or used
+# to generate an include file for another syslog daemons.
#
-# This additional socket is needed in case that syslogd is restarted. Otherwise
-# a chrooted dhcpd won't be able to continue logging.
+# This additional socket is needed in case that syslogd is restarted.
+# Otherwise a chrooted dhcpd won't be able to continue logging.
#
SYSLOGD_ADDITIONAL_SOCKET_DHCP="/var/lib/dhcp/dev/log"
+## Type: string
+## Default: "/var/lib/dhcp6/dev/log"
+## ServiceRestart: syslog
+#
+# The filename mentioned here will be added with the "-a ..." option as
+# additional socket via SYSLOGD_PARAMS when syslogd is started or used
+# to generate an include file for another syslog daemons.
+#
+# This additional socket is needed in case that syslogd is restarted.
+# Otherwise a chrooted dhcpd won't be able to continue logging.
+#
+SYSLOGD_ADDITIONAL_SOCKET_DHCP6="/var/lib/dhcp6/dev/log"
+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org