Compare commits
2 Commits
master
...
dev/autopr
| Author | SHA1 | Date | |
|---|---|---|---|
| c96f3918b4 | |||
| 0f091f9dfe |
4
Makefile
4
Makefile
@@ -1,10 +1,8 @@
|
||||
KICKSTARTS = \
|
||||
fedora-dc.ks \
|
||||
fedora-rpi-nvme-noswap.ks \
|
||||
fedora-rpi-nvme.ks \
|
||||
fedora-rpi.ks \
|
||||
fedora.ks \
|
||||
nvr2.ks \
|
||||
fedora.ks
|
||||
|
||||
.PHONY: all clean publish
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
%post
|
||||
cat > /root/.ssh/authorized_keys <<EOF
|
||||
expiry-time="$(date -d +1hour +%Y%m%d%H%M)",restrict,pty ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICoOO/ZYMxRgmyvqZwGN3NM5pHyh3NBdC7iZrXIopt93 Host Provisioner
|
||||
EOF
|
||||
|
||||
cat > /usr/local/libexec/notify-online.sh <<'EOF'
|
||||
{% include "notify-online.sh" %}
|
||||
EOF
|
||||
chmod +x /usr/local/libexec/notify-online.sh
|
||||
|
||||
cat > /etc/systemd/system/notify-online.service <<'EOF'
|
||||
{% include "notify-online.service" %}
|
||||
EOF
|
||||
|
||||
systemctl enable --no-reload notify-online.service
|
||||
%packages
|
||||
dch-autoprovision
|
||||
%end
|
||||
|
||||
%post
|
||||
{
|
||||
ls -la /root/.ssh
|
||||
chmod -R 700 /root/.ssh
|
||||
cat /root/.ssh/authorized_keys
|
||||
systemctl enable --no-reload notify-online.service
|
||||
sed -i 's/.*ForwardToConsole.*/ForwardToConsole=yes/' /etc/systemd/journald.conf
|
||||
grep ForwardTo /etc/systemd/journald.conf
|
||||
passwd -d root
|
||||
exit 0
|
||||
} > /dev/console
|
||||
%end
|
||||
|
||||
@@ -13,6 +13,7 @@ reboot
|
||||
-NetworkManager
|
||||
-authconfig
|
||||
-dhcp-client
|
||||
-dnf-plugins-core
|
||||
-dnf-yum
|
||||
-dracut-config-rescue
|
||||
-man-db
|
||||
@@ -26,17 +27,15 @@ reboot
|
||||
-yum
|
||||
chrony
|
||||
dnf
|
||||
dnf-command(system-upgrade)
|
||||
e2fsprogs
|
||||
grubby
|
||||
kitty-terminfo
|
||||
openssh-server
|
||||
python3-libdnf5
|
||||
python3-libselinux
|
||||
python3-policycoreutils
|
||||
rng-tools
|
||||
selinux-policy-targeted
|
||||
sshca-cli
|
||||
sshca-cli-systemd
|
||||
systemd-networkd
|
||||
%end
|
||||
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
{# vim: set ft=sh.jinja sw=4 ts=4 sts=4 et : -#}
|
||||
|
||||
bootloader --location mbr
|
||||
clearpart --all --initlabel
|
||||
reqpart
|
||||
|
||||
{% include "fedora-disk-dch.ks" %}
|
||||
{% include "fedora-common.ks" %}
|
||||
|
||||
%packages
|
||||
qemu-guest-agent
|
||||
-*-firmware
|
||||
-fwupd
|
||||
%end
|
||||
|
||||
%post --erroronfail
|
||||
set -e
|
||||
|
||||
rm -rf /etc/sysconfig/network-scripts /etc/sysconfig/network
|
||||
|
||||
ifname=$(ip -o route get 1.1.1.1 | awk '{print $5}')
|
||||
gateway=$(ip -o route get 1.1.1.1 | awk '{print $3}')
|
||||
macaddr=$(ip address show dev ${ifname} | awk '$1=="link/ether"{print $2}')
|
||||
ipaddr=$(ip address show dev ${ifname} | awk '$1=="inet"{print $2;exit}')
|
||||
if [ -f /run/systemd/resolve/resolv.conf ]; then
|
||||
resolv_conf=/run/systemd/resolve/resolv.conf
|
||||
else
|
||||
resolv_conf=/etc/resolv.conf
|
||||
fi
|
||||
nameservers=$(awk '$1=="nameserver"{print $2}' "${resolv_conf}" | xargs)
|
||||
|
||||
cat > /etc/systemd/network/40-pyrocufflink.network <<EOF
|
||||
[Match]
|
||||
MACAddress=${macaddr}
|
||||
|
||||
[Network]
|
||||
Description=pyrocufflink.blue network
|
||||
Address=${ipaddr}
|
||||
Gateway=${gateway}
|
||||
DNS=${nameservers}
|
||||
Domains=pyrocufflink.blue
|
||||
EOF
|
||||
|
||||
ln -srf /run/systemd/resolve/resolv.conf /etc/resolv.conf
|
||||
mkdir -p /etc/systemd/resolved.conf.d
|
||||
cat > /etc/systemd/resolved.conf.d/no-stub-listener.conf <<'EOF'
|
||||
[Resolve]
|
||||
DNSStubListener=no
|
||||
EOF
|
||||
%end
|
||||
|
||||
%post
|
||||
cat > /root/.ssh/authorized_keys <<EOF
|
||||
sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAINZCN2cxMDwedJ1Ke23Z3CZRcOYjqW8fFqsooRus7RK0AAAABHNzaDo= dustin@rosalina.pyrocufflink.blue
|
||||
EOF
|
||||
%end
|
||||
15
nvr2.ks.j2
15
nvr2.ks.j2
@@ -1,15 +0,0 @@
|
||||
{# vim: set ft=sh.jinja sw=4 ts=4 sts=4 et : -#}
|
||||
|
||||
# Create the "standard" disk layout using only the first disk
|
||||
# Other disks are left alone in case they already contain data, e.g.
|
||||
# migrated from another system.
|
||||
ignoredisk --only-use /dev/nvme0n1
|
||||
bootloader --location mbr
|
||||
clearpart --all --initlabel
|
||||
reqpart
|
||||
|
||||
network --hostname=nvr2.pyrocufflink.blue
|
||||
|
||||
{% include "fedora-disk-dch.ks" %}
|
||||
{% include "fedora-common.ks" %}
|
||||
{% include "autoprovision.ks.j2" %}
|
||||
Reference in New Issue
Block a user