From 02950c2e82073350e72b70b59915ad8e31add52f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zolt=C3=A1n=20Felleg?= Date: Fri, 11 Feb 2022 15:24:58 +0100 Subject: [PATCH] Updated ens.pm (converted to the new c3d format). --- .../firstboot/scripts}/01_setupnetworking.sh | 4 ++-- .../firstboot/scripts}/02_settimezone.sh | 0 sources/ens.pm/c3d/mode.txt | 4 ++++ sources/ens.pm/c3d/owner.txt | 3 +++ .../postinstall/install-data}/etc/named.conf | 0 .../c3d/postinstall/scripts/01_editfiles.sh | 6 ++++++ .../postinstall/scripts}/10_setupservices.sh | 0 sources/ens.pm/envvars | 2 -- sources/ens.pm/firstboot/03_setupldap.sh | 10 ---------- sources/ens.pm/firstboot/99_cleanup.sh | 6 ------ sources/ens.pm/postinstall/01_setownership.sh | 9 --------- sources/ens.pm/postinstall/02_setpermissions.sh | 7 ------- sources/ens.pm/postinstall/03_installfiles.sh | 16 ---------------- sources/ens.pm/postinstall/04_editfiles.sh | 6 ------ sources/ens.pm/postinstall/99_cleanup.sh | 6 ------ 15 files changed, 15 insertions(+), 64 deletions(-) rename sources/ens.pm/{firstboot => c3d/firstboot/scripts}/01_setupnetworking.sh (100%) rename sources/ens.pm/{firstboot => c3d/firstboot/scripts}/02_settimezone.sh (100%) create mode 100644 sources/ens.pm/c3d/mode.txt create mode 100644 sources/ens.pm/c3d/owner.txt rename sources/ens.pm/{postinstall/install => c3d/postinstall/install-data}/etc/named.conf (100%) create mode 100755 sources/ens.pm/c3d/postinstall/scripts/01_editfiles.sh rename sources/ens.pm/{postinstall => c3d/postinstall/scripts}/10_setupservices.sh (100%) delete mode 100755 sources/ens.pm/firstboot/03_setupldap.sh delete mode 100755 sources/ens.pm/firstboot/99_cleanup.sh delete mode 100755 sources/ens.pm/postinstall/01_setownership.sh delete mode 100755 sources/ens.pm/postinstall/02_setpermissions.sh delete mode 100755 sources/ens.pm/postinstall/03_installfiles.sh delete mode 100755 sources/ens.pm/postinstall/04_editfiles.sh delete mode 100755 sources/ens.pm/postinstall/99_cleanup.sh diff --git a/sources/ens.pm/firstboot/01_setupnetworking.sh b/sources/ens.pm/c3d/firstboot/scripts/01_setupnetworking.sh similarity index 100% rename from sources/ens.pm/firstboot/01_setupnetworking.sh rename to sources/ens.pm/c3d/firstboot/scripts/01_setupnetworking.sh index 7ba9de8..8efeede 100755 --- a/sources/ens.pm/firstboot/01_setupnetworking.sh +++ b/sources/ens.pm/c3d/firstboot/scripts/01_setupnetworking.sh @@ -37,8 +37,6 @@ CONNECTION_LINE=$(nmcli --terse connection show) CONNECTION_UUID=$(echo $CONNECTION_LINE | cut -f 2 -d ':') CONNECTION_DEVICE=$(echo $CONNECTION_LINE | cut -f 4 -d ':') -nmcli connection delete uuid "$CONNECTION_UUID" - nmcli connection add \ connection.autoconnect yes \ connection.id perimeter \ @@ -58,4 +56,6 @@ nmcli connection add \ ipv6.method "manual" \ save yes +nmcli connection delete uuid "$CONNECTION_UUID" + nmcli connection show diff --git a/sources/ens.pm/firstboot/02_settimezone.sh b/sources/ens.pm/c3d/firstboot/scripts/02_settimezone.sh similarity index 100% rename from sources/ens.pm/firstboot/02_settimezone.sh rename to sources/ens.pm/c3d/firstboot/scripts/02_settimezone.sh diff --git a/sources/ens.pm/c3d/mode.txt b/sources/ens.pm/c3d/mode.txt new file mode 100644 index 0000000..ee44133 --- /dev/null +++ b/sources/ens.pm/c3d/mode.txt @@ -0,0 +1,4 @@ +# mode file (relative to /c3d) +755 firstboot/scripts/*.sh +640 postinstall/install-data/etc/named.conf +755 postinstall/scripts/*.sh diff --git a/sources/ens.pm/c3d/owner.txt b/sources/ens.pm/c3d/owner.txt new file mode 100644 index 0000000..86b3d1d --- /dev/null +++ b/sources/ens.pm/c3d/owner.txt @@ -0,0 +1,3 @@ +# owner file (relative to /c3d) +# shell globbing does not work +root.named postinstall/install-data/etc/named.conf diff --git a/sources/ens.pm/postinstall/install/etc/named.conf b/sources/ens.pm/c3d/postinstall/install-data/etc/named.conf similarity index 100% rename from sources/ens.pm/postinstall/install/etc/named.conf rename to sources/ens.pm/c3d/postinstall/install-data/etc/named.conf diff --git a/sources/ens.pm/c3d/postinstall/scripts/01_editfiles.sh b/sources/ens.pm/c3d/postinstall/scripts/01_editfiles.sh new file mode 100755 index 0000000..816ca13 --- /dev/null +++ b/sources/ens.pm/c3d/postinstall/scripts/01_editfiles.sh @@ -0,0 +1,6 @@ +#!/bin/sh + + +sed --in-place=.orig \ + '/^After=.*network\.target.*$/a After=network-online.target\nWants=network-online.target' \ + /usr/lib/systemd/system/named.service diff --git a/sources/ens.pm/postinstall/10_setupservices.sh b/sources/ens.pm/c3d/postinstall/scripts/10_setupservices.sh similarity index 100% rename from sources/ens.pm/postinstall/10_setupservices.sh rename to sources/ens.pm/c3d/postinstall/scripts/10_setupservices.sh diff --git a/sources/ens.pm/envvars b/sources/ens.pm/envvars index 875dfc1..67de93f 100644 --- a/sources/ens.pm/envvars +++ b/sources/ens.pm/envvars @@ -1,5 +1,3 @@ DISTRIBUTION=Fedora DISTRIBUTION_VERSION=35 -ROOT_PACKAGES="hostname initscripts iproute rootfiles systemd-udev" -BASE_PACKAGES="NetworkManager iputils logrotate rsyslog tar vim-minimal" SPEC_PACKAGES="bind bind-utils" diff --git a/sources/ens.pm/firstboot/03_setupldap.sh b/sources/ens.pm/firstboot/03_setupldap.sh deleted file mode 100755 index 415d6db..0000000 --- a/sources/ens.pm/firstboot/03_setupldap.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - - -exit 0 -authselect select sssd with-mkhomedir --force - -cat >>/etc/openldap/ldap.conf <