Updated ens.pm (converted to the new c3d format).
authorZoltán Felleg <zoltan.felleg@userrendszerhaz.hu>
Fri, 11 Feb 2022 14:24:58 +0000 (15:24 +0100)
committerZoltán Felleg <zoltan.felleg@userrendszerhaz.hu>
Fri, 11 Feb 2022 14:24:58 +0000 (15:24 +0100)
15 files changed:
sources/ens.pm/c3d/firstboot/scripts/01_setupnetworking.sh [moved from sources/ens.pm/firstboot/01_setupnetworking.sh with 100% similarity]
sources/ens.pm/c3d/firstboot/scripts/02_settimezone.sh [moved from sources/ens.pm/firstboot/02_settimezone.sh with 100% similarity]
sources/ens.pm/c3d/mode.txt [new file with mode: 0644]
sources/ens.pm/c3d/owner.txt [new file with mode: 0644]
sources/ens.pm/c3d/postinstall/install-data/etc/named.conf [moved from sources/ens.pm/postinstall/install/etc/named.conf with 100% similarity]
sources/ens.pm/c3d/postinstall/scripts/01_editfiles.sh [new file with mode: 0755]
sources/ens.pm/c3d/postinstall/scripts/10_setupservices.sh [moved from sources/ens.pm/postinstall/10_setupservices.sh with 100% similarity]
sources/ens.pm/envvars
sources/ens.pm/firstboot/03_setupldap.sh [deleted file]
sources/ens.pm/firstboot/99_cleanup.sh [deleted file]
sources/ens.pm/postinstall/01_setownership.sh [deleted file]
sources/ens.pm/postinstall/02_setpermissions.sh [deleted file]
sources/ens.pm/postinstall/03_installfiles.sh [deleted file]
sources/ens.pm/postinstall/04_editfiles.sh [deleted file]
sources/ens.pm/postinstall/99_cleanup.sh [deleted file]

similarity index 100%
rename from sources/ens.pm/firstboot/01_setupnetworking.sh
rename to sources/ens.pm/c3d/firstboot/scripts/01_setupnetworking.sh
index 7ba9de86f06ef2589a0f046d94d26f9b2801922a..8efeede641e5af0018a69004ad07f41b4d8642e5 100755 (executable)
@@ -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/c3d/mode.txt b/sources/ens.pm/c3d/mode.txt
new file mode 100644 (file)
index 0000000..ee44133
--- /dev/null
@@ -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 (file)
index 0000000..86b3d1d
--- /dev/null
@@ -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/c3d/postinstall/scripts/01_editfiles.sh b/sources/ens.pm/c3d/postinstall/scripts/01_editfiles.sh
new file mode 100755 (executable)
index 0000000..816ca13
--- /dev/null
@@ -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
index 875dfc12c566a865b82f35c685c21425dbd7af90..67de93fc89aa6fa0744d16a47bfcc961be0eec56 100644 (file)
@@ -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 (executable)
index 415d6db..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-
-exit 0
-authselect select sssd with-mkhomedir --force
-
-cat >>/etc/openldap/ldap.conf <<EOF
-BASE dc=user,dc=hu
-URI ldap://ldap.in.useribm.hu
-EOF
diff --git a/sources/ens.pm/firstboot/99_cleanup.sh b/sources/ens.pm/firstboot/99_cleanup.sh
deleted file mode 100755 (executable)
index b87f2f4..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-
-REAL_PATH=$(dirname $(realpath $0))
-
-echo rm -Rf $REAL_PATH
diff --git a/sources/ens.pm/postinstall/01_setownership.sh b/sources/ens.pm/postinstall/01_setownership.sh
deleted file mode 100755 (executable)
index 51d768a..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-
-REAL_PATH=$(dirname $(realpath $0))
-SOURCE_PATH=$REAL_PATH/install
-
-chown -R root.root $SOURCE_PATH/*
-
-chgrp named $SOURCE_PATH/etc/named.conf
diff --git a/sources/ens.pm/postinstall/02_setpermissions.sh b/sources/ens.pm/postinstall/02_setpermissions.sh
deleted file mode 100755 (executable)
index e7e809e..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-
-REAL_PATH=$(dirname $(realpath $0))
-SOURCE_PATH=$REAL_PATH/install
-
-chmod 640 $SOURCE_PATH/etc/named.conf
diff --git a/sources/ens.pm/postinstall/03_installfiles.sh b/sources/ens.pm/postinstall/03_installfiles.sh
deleted file mode 100755 (executable)
index e4ee7ff..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-
-REAL_PATH=$(dirname $(realpath $0))
-
-tar --create \
-    --directory=$REAL_PATH \
-    --exclude=.placeholder \
-    --to-stdout \
-    install \
-    | tar --extract \
-          --backup \
-          --directory=/ \
-          --no-overwrite-dir \
-          --strip-components=1 \
-          --suffix=.orig
diff --git a/sources/ens.pm/postinstall/04_editfiles.sh b/sources/ens.pm/postinstall/04_editfiles.sh
deleted file mode 100755 (executable)
index 097b9b0..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-
-sed --in-place=.orig \
-    's/^After=\(.*\)network\.target\(.*\)$/After=\1network-online.target\2/' \
-    /usr/lib/systemd/system/named.service
diff --git a/sources/ens.pm/postinstall/99_cleanup.sh b/sources/ens.pm/postinstall/99_cleanup.sh
deleted file mode 100755 (executable)
index b87f2f4..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-
-REAL_PATH=$(dirname $(realpath $0))
-
-echo rm -Rf $REAL_PATH