#!/bin/sh
+export PAGER=
+
+
sleep 1
systemctl --quiet is-active NetworkManager.service
NM_RC=$?
-WAITED=0
+CYCLES_WAITED=0
while [ $NM_RC -ne 0 ]
do
+ if [ $CYCLES_WAITED -ge 10 ]
+ then
+ exit 1
+ fi
echo -n .
sleep 1
- WAITED=1
+ CYCLES_WAITED=$(( $CYCLES_WAITED + 1 ))
systemctl --quiet is-active NetworkManager.service
NM_RC=$?
done
-[ $WAITED -eq 1 ] && echo
+[ $CYCLES_WAITED -gt 0 ] && echo
-CONNECTIONS=$(nmcli --terse connection show | wc -l)
-while [ $CONNECTIONS -ne 1 ]
+# wait for one/the network connection to come up
+CONNECTION_DEVICES_UP=$(nmcli --terse connection show \
+ | grep --invert-match ':$' | wc -l)
+CYCLES_WAITED=0
+while [ $CONNECTION_DEVICES_UP -lt 1 ]
do
- echo "Number of connections: $CONNECTIONS" >&2
+ if [ $CYCLES_WAITED -ge 10 ]
+ then
+ nmcli connection show
+ exit 1
+ fi
+ echo -n .
sleep 1
- CONNECTIONS=$(nmcli --terse connection show | wc -l)
+ CYCLES_WAITED=$(( $CYCLES_WAITED + 1 ))
+ CONNECTION_DEVICES_UP=$(nmcli --terse connection show \
+ | grep --invert-match ':$' | wc -l)
done
+[ $CYCLES_WAITED -gt 0 ] && echo
-nmcli --terse connection show | grep ':$' >/dev/null
-ALL_CONNECTION_DEVICES_KNOWN=$?
-while [ $ALL_CONNECTION_DEVICES_KNOWN -eq 0 ]
-do
- echo "Not all connection devices are known yet" >&2
- sleep 1
- nmcli --terse connection show | grep ':$' >/dev/null
- ALL_CONNECTION_DEVICES_KNOWN=$?
-done
+CONNECTIONS=$(nmcli --terse connection show | wc -l)
+if [ $CONNECTIONS -ne 1 ]
+then
+ echo "Number of connections: $CONNECTIONS" >&2
+ exit 1
+fi
CONNECTION_LINE=$(nmcli --terse connection show)
CONNECTION_UUID=$(echo $CONNECTION_LINE | cut -f 2 -d ':')
systemctl enable httpd.service
-
+systemctl start httpd.service
systemctl enable NetworkManager-wait-online.service
+systemctl start NetworkManager-wait-online.service
systemctl enable logrotate.timer
+systemctl start logrotate.timer
+
--- /dev/null
+# mode file (relative to /c3d)
+755 firstboot/scripts/*.sh
+755 postinstall/scripts/*.sh
+
--- /dev/null
+# owner file (relative to /c3d)
+apache:apache postinstall/install-data/etc/dokuwiki/*
--- /dev/null
+#!/bin/sh
+
+
+systemctl disable httpd.service
+systemctl disable NetworkManager-wait-online.service
+
+systemctl disable logrotate.timer
--- /dev/null
+#!/bin/sh
+
+
+touch /etc/dokuwiki/local.php
DISTRIBUTION=Fedora
DISTRIBUTION_VERSION=37
-ROOT_PACKAGES="hostname initscripts iproute rootfiles systemd-udev"
-BASE_PACKAGES="NetworkManager iputils logrotate rsyslog tar vim-minimal"
-SPEC_PACKAGES="dokuwiki httpd mod_ssl php-ldap python3-certbot-apache"
+SPEC_PACKAGES="dokuwiki httpd php php-fpm php-ldap"
+++ /dev/null
-#!/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
+++ /dev/null
-#!/bin/sh
-exit 0
-
-
-for f in /etc/httpd/conf.d/*.le
-do
- cf=$(echo $f | sed 's/^\(.*\).le$/\1/')
- mv $f $cf
-done
-/usr/bin/cp \
- --archive \
- /usr/lib/python3.10/site-packages/certbot_apache/_internal/tls_configs/current-options-ssl-apache.conf \
- /etc/letsencrypt/options-ssl-apache.conf
-systemctl enable httpd.service
-systemctl start httpd.service
+++ /dev/null
-#!/bin/sh
-
-
-REAL_PATH=$(dirname $(realpath $0))
-
-echo rm -Rf $REAL_PATH
+++ /dev/null
-#!/bin/sh
-
-
-REAL_PATH=$(dirname $(realpath $0))
-SOURCE_PATH=$REAL_PATH/install
-
-chown -R root.root $SOURCE_PATH/*
+++ /dev/null
-#!/bin/sh
-
-
-REAL_PATH=$(dirname $(realpath $0))
-SOURCE_PATH=$REAL_PATH/install
-
-chown apache.apache $SOURCE_PATH/etc/dokuwiki/*
+++ /dev/null
-#!/bin/sh
-
-
-REAL_PATH=$(dirname $(realpath $0))
-SOURCE_PATH=$REAL_PATH/install
-
-touch $SOURCE_PATH/etc/dokuwiki/local.php
+++ /dev/null
-#!/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
+++ /dev/null
-#!/bin/sh
-
-
-REAL_PATH=$(dirname $(realpath $0))
-
-echo rm -Rf $REAL_PATH
+++ /dev/null
-ws.pm.useribm.hu /etc/letsencrypt etc