dataset/seed/base-machine/manual/install/install_host

32 lines
1.2 KiB
Text
Raw Normal View History

2022-05-04 10:29:03 +02:00
#!/bin/bash -e
2022-03-08 19:42:28 +01:00
HOST_NAME=$1
if [ -z "$HOST_NAME" ]; then
echo "usage: $0 host name"
exit 1
fi
2022-07-01 18:54:06 +02:00
apt install --yes systemd-container dnf jq debootstrap htop gettext patch unzip mlocate xz-utils
2022-03-08 19:42:28 +01:00
systemd-tmpfiles --create --clean --remove $PWD/host/configurations/$HOST_NAME/tmpfiles.d/0asystemd-nspawn.conf
systemd-tmpfiles --create --clean --remove $PWD/host/configurations/$HOST_NAME/tmpfiles.d/0rougail.conf
systemctl daemon-reload
systemctl restart systemd-sysctl.service
systemctl enable systemd-networkd
systemctl restart systemd-networkd
systemctl enable systemd-resolved
systemctl restart systemd-resolved
# systemctl mask dev-hugepages.mount
2022-05-21 18:49:06 +02:00
systemctl enable risotto-images.timer
systemctl restart risotto-images.timer
2022-03-08 19:42:28 +01:00
#nft add table nat
#nft flush table nat;
#nft 'add chain nat prerouting { type nat hook prerouting priority -100; }'
#nft 'add rule nat prerouting iif enp0s3 tcp dport { 80, 443 } dnat to 192.168.45.12'
#nft 'add chain nat postrouting { type nat hook postrouting priority -100; }'
#nft 'add rule nat postrouting ip saddr 192.168.45.10 oif enp0s8 tcp dport 53 snat to 10.0.3.15'
#nft 'add rule nat postrouting ip saddr 192.168.45.10 oif enp0s8 udp dport 53 snat to 10.0.3.15'
2022-05-04 10:29:03 +02:00
echo "install host OK"
2022-03-08 19:42:28 +01:00
exit 0