From dcf74129f517b23f9f68c8c78d61f3346a675c09 Mon Sep 17 00:00:00 2001
From: Daniel Gachet <daniel.gachet@hefr.ch>
Date: Sat, 11 Sep 2021 08:38:01 +0200
Subject: [PATCH] wip

---
 config/tftp-server.service    | 13 +++++++++++++
 config/tftp-server.socket     |  8 ++++++++
 install-fedora-environment.sh | 33 ++++-----------------------------
 3 files changed, 25 insertions(+), 29 deletions(-)
 create mode 100644 config/tftp-server.service
 create mode 100644 config/tftp-server.socket

diff --git a/config/tftp-server.service b/config/tftp-server.service
new file mode 100644
index 0000000..7d62d2c
--- /dev/null
+++ b/config/tftp-server.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Tftp Server
+Requires=tftp-server.socket
+Documentation=man:in.tftpd
+
+[Service]
+ExecStart=/usr/sbin/in.tftpd -p -s /home/lmi/workspace/nano/buildroot/output/images
+
+StandardInput=socket
+
+[Install]
+WantedBy=multi-user.target
+Also=tftp-server.socket
diff --git a/config/tftp-server.socket b/config/tftp-server.socket
new file mode 100644
index 0000000..8764c1d
--- /dev/null
+++ b/config/tftp-server.socket
@@ -0,0 +1,8 @@
+[Unit]
+Description=Tftp Server Activation Socket
+
+[Socket]
+ListenDatagram=69
+
+[Install]
+WantedBy=sockets.target
diff --git a/install-fedora-environment.sh b/install-fedora-environment.sh
index fad5e6c..63174ec 100755
--- a/install-fedora-environment.sh
+++ b/install-fedora-environment.sh
@@ -23,30 +23,16 @@ sudo dnf install -y gnome-tweak-tool firewall-config kernel-devel libyaml-devel
 sudo dnf install -y gcc-c++ autoconf libtool dtc make patch ctags openssl-devel uboot-tools ncurses-devel mercurial
 sudo dnf install -y flex bison swig python-devel python3-devel policycoreutils-python-utils perl-ExtUtils-MakeMaker
 
-## make additional symbolic links for former libraries used by aarch64 gdb 
-## probably to be removed with newest buildroot version
-##sudo ln -s /usr/lib64/libtinfo.so.6.1 /usr/lib64/libtinfo.so.5
-##sudo ln -s /usr/lib64/libncursesw.so.6.1 /usr/lib64/libncursesw.so.5
-
 #install git tools and configure keyring
 sudo dnf install -y git-gui meld
 sudo dnf install -y git-credential-libsecret
 git config --global credential.helper /usr/libexec/git-core/git-credential-libsecret
 
-# #install eclipse IDE
-# if [ ! -d "/opt/eclipse" ]; then
-# wget http://mirrors.uniri.hr/eclipse//technology/epp/downloads/release/photon/R/eclipse-cpp-photon-R-linux-gtk-x86_64.tar.gz
-# sudo tar xf eclipse-cpp-photon-R-linux-gtk-x86_64.tar.gz -C /opt
-# sudo ln -s /opt/eclipse/eclipse /usr/bin/eclipse
-# rm eclipse-cpp-photon-R-linux-gtk-x86_64.tar.gz
-# fi
-# cp ${SCRIPTDIR}/config/eclipse.desktop ~/.local/share/applications/
-
 #install tftpd server
-sudo dnf install -y tftp-server xinetd 
-sudo cp ${SCRIPTDIR}/config/tftp /etc/xinetd.d/
-sudo systemctl start xinetd.service
-sudo systemctl enable xinetd.service
+sudo dnf install -y tftp-server tftp 
+sudo cp ${SCRIPTDIR}/config/tftp-server.* /etc/systemd/system
+sudo systemctl daemon-load
+sudo systemctl enable --now tftp-server
 sudo setsebool -P tftp_anon_write 1
 sudo setsebool -P tftp_home_dir 1
 
@@ -61,14 +47,3 @@ sudo firewall-cmd --permanent --zone FedoraWorkstation --add-service nfs
 sudo firewall-cmd --permanent --zone FedoraWorkstation --add-service tftp
 sudo firewall-cmd --permanent --zone FedoraWorkstation --add-service rpc-bind
 sudo firewall-cmd --reload
-
-# echo ""
-# echo "How to fix Flickering in Fedora on Virtualbox"
-# echo "according to https://www.serverlab.ca/tutorials/linux/administration-linux/how-to-fix-flickering-in-fedora-on-virtualbox/"
-# echo ""
-# echo "edit file : /etc/gdm/custom.conf"
-# echo "under '[DAEMON]':"
-# echo " - uncomment variable 'WaylandEnable' and ensure it is set to 'false'"
-# echo " - add line 'DefaultSession=gnome=xorg.desktop'"
-# echo "save the file and restart"
-# echo ""
-- 
GitLab