add new scripts to fetch

uncomment network bridge creation, which is incomplete as of now
This commit is contained in:
lukas 2021-11-08 17:10:11 +01:00
parent 2321381567
commit 8692ae5989

View File

@ -24,24 +24,31 @@ guestfs-tools # Complementary tools useful for interacting with vith guest syste
%end # End of the packages section
%post --nochroot --log=/root/bh.log # Beginning of %post section. Those commands are executed outside the chroot environment. Logging is enabled to help with post-installation troubleshooting
%post --nochroot --log=/mnt/sysimage/root/bh.log # Beginning of %post section. Those commands are executed outside the chroot environment. Logging is enabled to help with post-installation troubleshooting
# %post --log=/root/bh.log # Beginning of %post section. Those commands are executed outside the chroot environment. Logging is enabled to help with post-installation troubleshooting
mkdir /mnt/sysimage/var/lib/libvirt/iso # Create a directory to store iso images
wget https://boot.netboot.xyz/ipxe/netboot.xyz.iso -P /mnt/sysimage/var/lib/libvirt/iso/
wget https://boot.netboot.xyz/ipxe/netboot.xyz.iso -P /mnt/sysimage/var/lib/libvirt/iso/ # fetch netboot.xyz iso
wget https://git.phyllo.me/home/PhyllomeOS/raw/branch/main/post-installation/post-install.sh -P /mnt/sysimage/usr/sbin/
chmod +x /mnt/sysimage/usr/sbin/post-install.sh
# fetch custom script and make it executable
wget https://git.phyllo.me/home/PhyllomeOS/raw/branch/main/post/configure-vmm-and-desktop.sh -P /mnt/sysimage/usr/sbin/
chmod +x /mnt/sysimage/usr/sbin/configure-vmm-and-desktop.sh
# Create new file /etc/systemd/system/postinstall.service using cat:
#
# fetch custom script and make it executable
wget https://git.phyllo.me/home/PhyllomeOS/raw/branch/main/post/create-live-vm.sh -P /mnt/sysimage/usr/sbin/
chmod +x /mnt/sysimage/usr/sbin/create-live-vm.sh
# fetch custom script and make it executable
wget https://git.phyllo.me/home/PhyllomeOS/raw/branch/main/post/virtualization-tweaks-root-needed.sh -P /mnt/sysimage/usr/sbin/
chmod +x /mnt/sysimage/usr/sbin/virtualization-tweaks-root-needed.sh
# # Create new file /etc/systemd/system/postinstall.service using cat:
# cat > /mnt/sysimage/etc/systemd/system/post-install.service<< EOF
# [Unit]
# Description=post-installation configuration for Phyllome OS
# After=systemd-remount-fs.service
# Before=systemd-sysusers.service sysinit.target shutdown.target
# ConditionFirstBoot=yes
# Description=Post-installation configuration for Phyllome OS
# After=gdm.service
# Requires=gdm.service
#
# [Service]
# Type=oneshot
@ -52,18 +59,15 @@ chmod +x /mnt/sysimage/usr/sbin/post-install.sh
# WantedBy=multi-user.target
# EOF
#
# systemctl enable post-install.service # Enable systemd unit
# systemctl enable /mnt/sysimage/etc/systemd/system/post-install.service # Enable systemd unit
# Add a network bridge. Still need to declare it to libvirt/virt-manager
nmcli con add ifname br0 type bridge con-name br0
nmcli con add type bridge-slave ifname enp1s0 master br0 # to-do : generalize this command so that it could regardless of the name of the ethernet device
nmcli con up br0
# nmcli con add ifname br0 type bridge con-name br0
# nmcli con add type bridge-slave ifname enp1s0 master br0 # to-do : generalize this command so that it could regardless of the name of the ethernet device
# nmcli con up br0
%end # End of the %post section
# %post # Beginning of the post-installation section.
#
# systemctl enable post-install.service
#
# %end # End of the %post section