[debian-edu-commits] [Git][debian-edu/debian-edu-config][master] 3 commits: Add isc-dhcp-server.service files to allow conditional configuration
Wolfgang Schweer
gitlab at salsa.debian.org
Mon Jan 25 16:02:12 GMT 2021
Wolfgang Schweer pushed to branch master at Debian Edu / debian-edu-config
Commits:
ae8972a8 by Wolfgang Schweer at 2021-01-25T16:11:41+01:00
Add isc-dhcp-server.service files to allow conditional configuration
These files are suited for three cases:
- plain main server
- combined (main and LTSP) server
- separate LTSP server
Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>
- - - - -
a9caad8c by Wolfgang Schweer at 2021-01-25T16:26:20+01:00
Rework cf3/cf.dhcpserver to allow isc-dhcp-server to work properly
Besides useful in itself (because editing /etc/default/isc-dhcp-server can be
dropped), the pitfall due to bug #971275 is also avoided.
Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>
- - - - -
f917b10e by Wolfgang Schweer at 2021-01-25T16:50:16+01:00
Add changelog entries for last commits
Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>
- - - - -
5 changed files:
- Makefile
- cf3/cf.dhcpserver
- debian/changelog
- + share/debian-edu-config/isc-dhcp-server.service
- + share/debian-edu-config/isc-dhcp-server.service.eth1_only
Changes:
=====================================
Makefile
=====================================
@@ -339,6 +339,8 @@ install: install-testsuite
share/debian-edu-config/gosa.conf.template \
share/debian-edu-config/lightdm-gtk-greeter.conf \
share/debian-edu-config/sudo-ldap.conf \
+ share/debian-edu-config/isc-dhcp-server.service \
+ share/debian-edu-config/isc-dhcp-server.service.eth1_only \
share/pam-configs/edu-group \
share/pam-configs/edu-umask \
share/perl5/Debian/Edu.pm \
=====================================
cf3/cf.dhcpserver
=====================================
@@ -1,5 +1,6 @@
bundle agent dhcpserver
{
+# Configure isc-dhcp server and client conditionally.
files:
@@ -15,43 +16,22 @@ files:
link_from => ln_s("/etc/dhcp/dhclient-debian-edu.conf"),
move_obstructions => "true";
- debian.server.!ltspserver::
-
- "/etc/default/isc-dhcp-server"
- edit_line => ip_conf1;
-
debian.server.ltspserver::
- "/etc/default/isc-dhcp-server"
- edit_line => ip_conf2;
+ "/etc/systemd/system/isc-dhcp-server.service"
+ copy_from => local_cp("/usr/share/debian-edu-config/isc-dhcp-server.service");
debian.!server.ltspserver::
- "/etc/default/isc-dhcp-server"
- edit_line => ip_conf3;
-}
-
-bundle edit_line ip_conf1
-{
-
-replace_patterns:
-
- "INTERFACESv4=\"\"" replace_with => value("INTERFACESv4=\"eth0\"");
-}
-
-bundle edit_line ip_conf2
-{
-
-replace_patterns:
-
- "INTERFACESv4=\"\"" replace_with => value("INTERFACESv4=\"eth0 eth1\"");
-}
+ "/etc/systemd/system/isc-dhcp-server.service"
+ copy_from => local_cp("/usr/share/debian-edu-config/isc-dhcp-server.service.eth1_only");
-bundle edit_line ip_conf3
-{
+commands:
-replace_patterns:
+ debian.(server|ltspserver).installation::
- "INTERFACESv4=\"\"" replace_with => value("INTERFACESv4=\"eth1\"");
+ "/usr/bin/systemctl enable isc-dhcp-server.service"
+ contain => in_shell;
+ "/usr/bin/systemctl restart isc-dhcp-server.service"
+ contain => in_shell;
}
-
=====================================
debian/changelog
=====================================
@@ -1,3 +1,15 @@
+debian-edu-config (2.11.46) UNRELEASED; urgency=medium
+
+ * Rework DHCP setup. Editing /etc/default/isc-dhcp-server can be dropped this
+ way and the pitfall due to bug #971275 is also avoided:
+ - Add share/debian-edu-config/isc-dhcp-server.service and
+ share/debian-edu-config/isc-dhcp-server.service.eth1_only. These files
+ are used for conditional configuration addressing three cases: plain main
+ server, combined (main and LTSP) server, and separate LTSP server.
+ - Adjust cf3/cf.dhcpserver accordingly.
+
+ -- Wolfgang Schweer <wschweer at arcor.de> Mon, 25 Jan 2021 16:29:41 +0100
+
debian-edu-config (2.11.45) unstable; urgency=medium
[ Wolfgang Schweer ]
=====================================
share/debian-edu-config/isc-dhcp-server.service
=====================================
@@ -0,0 +1,17 @@
+# Automatically generated by systemd-sysv-generator
+
+[Unit]
+Description=DHCP server
+After=network.target network-online.target slapd.service
+Wants=network-online.target
+
+[Service]
+Type=forking
+KillSignal=SIGINT
+RestartSec=2s
+Restart=on-failure
+StartLimitInterval=12s
+ExecStart=/usr/sbin/dhcpd -4 -q -cf /etc/dhcp/dhcpd.conf
+
+[Install]
+WantedBy=multi-user.target
=====================================
share/debian-edu-config/isc-dhcp-server.service.eth1_only
=====================================
@@ -0,0 +1,17 @@
+# Automatically generated by systemd-sysv-generator
+
+[Unit]
+Description=DHCP server
+After=network.target network-online.target slapd.service
+Wants=network-online.target
+
+[Service]
+Type=forking
+KillSignal=SIGINT
+RestartSec=2s
+Restart=on-failure
+StartLimitInterval=12s
+ExecStart=/usr/sbin/dhcpd -4 -q -cf /etc/dhcp/dhcpd.conf eth1
+
+[Install]
+WantedBy=multi-user.target
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/compare/a392480af525db5672863a5290b038b5d8772a37...f917b10eb8ddcb90ecea6da36d0da09e91815634
--
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/compare/a392480af525db5672863a5290b038b5d8772a37...f917b10eb8ddcb90ecea6da36d0da09e91815634
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20210125/6b939ea9/attachment-0001.html>
More information about the debian-edu-commits
mailing list