From dbc88b9a2cc432560e0b2711001c9e56020ab104 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Pialasse Date: Tue, 16 Apr 2024 15:50:13 -0400 Subject: [PATCH] * Tue Apr 16 2024 Jean-Philippe Pialasse 11.0.0-8.sme - add requirement for ppp [SME: 12622] - add requirement for rp-pppoe [SME: 12628] - enable modprobe dummy and bond [SME: 12627] --- createlinks | 1 + .../lib/modprobe.d/systemd.conf/10bond | 18 ++++++++++++++++++ .../lib/modprobe.d/systemd.conf/10dummy | 5 +++++ root/sbin/e-smith/systemd/network-pre | 4 ++++ root/usr/lib/systemd/system/networking.service | 1 + smeserver-base.spec | 12 ++++++++++-- 6 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 root/etc/e-smith/templates/lib/modprobe.d/systemd.conf/10bond create mode 100644 root/etc/e-smith/templates/lib/modprobe.d/systemd.conf/10dummy create mode 100644 root/sbin/e-smith/systemd/network-pre diff --git a/createlinks b/createlinks index 988d392..cc82eae 100755 --- a/createlinks +++ b/createlinks @@ -64,6 +64,7 @@ foreach (qw( /etc/resolv.conf /etc/sysctl.conf /var/service/wan/dhclient.config + /lib/modprobe.d/systemd.conf )) { templates2events($_, qw(console-save bootstrap-console-save smeserver-base-update)); diff --git a/root/etc/e-smith/templates/lib/modprobe.d/systemd.conf/10bond b/root/etc/e-smith/templates/lib/modprobe.d/systemd.conf/10bond new file mode 100644 index 0000000..ef7a69c --- /dev/null +++ b/root/etc/e-smith/templates/lib/modprobe.d/systemd.conf/10bond @@ -0,0 +1,18 @@ +# SPDX-License-Identifier: LGPL-2.1+ +# +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# +# When bonding module is loaded, it creates bond0 by default due to max_bonds +# option default value 1. This interferes with the network configuration +# management / networkd, as it is not possible to detect whether this bond0 was +# intentionally configured by the user, or should be managed by +# networkd/NM/etc. Therefore disable bond0 creation. +# KOOZALI SME Server we do use it, and do not use NM, so enabling +options bonding max_bonds=1 + + diff --git a/root/etc/e-smith/templates/lib/modprobe.d/systemd.conf/10dummy b/root/etc/e-smith/templates/lib/modprobe.d/systemd.conf/10dummy new file mode 100644 index 0000000..6cd9047 --- /dev/null +++ b/root/etc/e-smith/templates/lib/modprobe.d/systemd.conf/10dummy @@ -0,0 +1,5 @@ +# Do the same for dummy0. +# KOOZALI SME Server,we do use it too, so enabling + +options dummy numdummies=1 + diff --git a/root/sbin/e-smith/systemd/network-pre b/root/sbin/e-smith/systemd/network-pre new file mode 100644 index 0000000..beb1f54 --- /dev/null +++ b/root/sbin/e-smith/systemd/network-pre @@ -0,0 +1,4 @@ +#!/bin/bash +# make sure that dummy driver is enabled +/usr/sbin/lsmod |/usr/bin/grep -q dummy || /usr/sbin/modprobe dummy numdummies=1 + diff --git a/root/usr/lib/systemd/system/networking.service b/root/usr/lib/systemd/system/networking.service index a7b1208..d71a403 100644 --- a/root/usr/lib/systemd/system/networking.service +++ b/root/usr/lib/systemd/system/networking.service @@ -7,6 +7,7 @@ Conflicts=NetworkManager.service [Service] Type=oneshot +ExecStartPre=/sbin/e-smith/systemd/network-pre ExecStart=/etc/rc.d/init.d/network start ExecStop=/etc/rc.d/init.d/network stop ExecReload=/etc/rc.d/init.d/network restart diff --git a/smeserver-base.spec b/smeserver-base.spec index 44b5dd9..36132ef 100644 --- a/smeserver-base.spec +++ b/smeserver-base.spec @@ -4,7 +4,7 @@ Summary: smeserver server and gateway - base module %define name smeserver-base Name: %{name} %define version 11.0.0 -%define release 7 +%define release 8 Version: %{version} Release: %{release}%{?dist} License: GPL @@ -39,6 +39,7 @@ Requires: smeserver-bootloader Requires: mdadm Requires: pv Requires: dhcp-server +Requires: dhcp-client Requires: diald Requires: /usr/bin/passwd Requires: nss-pam-ldapd @@ -63,7 +64,8 @@ BuildRequires: perl, perl(Test::Inline) >= 0.12 BuildRequires: smeserver-devtools >= 1.13.1-03 BuildRequires: gettext Requires: gdisk - +Requires: ppp +Requires: rp-pppoe %define dbfiles accounts configuration domains hosts networks AutoReqProv: no @@ -101,6 +103,7 @@ rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/etc/selinux (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ + --file /sbin/e-smith/systemd/network-pre 'attr(0554,root,root)' \ --file /sbin/e-smith/systemd/mdmonitor-pre 'attr(0554,root,root)' \ --file /sbin/e-smith/systemd/rsyslog-pre 'attr(0554,root,root)' \ --file /etc/cron.daily/conf-mod_ssl 'attr(0544,root,root)' \ @@ -181,6 +184,11 @@ fi %changelog +* Tue Apr 16 2024 Jean-Philippe Pialasse 11.0.0-8.sme +- add requirement for ppp [SME: 12622] +- add requirement for rp-pppoe [SME: 12628] +- enable modprobe dummy and bond [SME: 12627] + * Sat Apr 13 2024 Jean-Philippe Pialasse 11.0.0-7.sme - fix init-accounts [SME: 12546]