From 0c7df21a08dc4c9a49e65050770eeb86132ec13e Mon Sep 17 00:00:00 2001
From: Martin Pietsch <martin.pietsch@tu-dresden.de>
Date: Wed, 13 Nov 2019 14:03:37 +0100
Subject: [PATCH] refactored installer.sh

---
 files/installer.sh | 36 +++++++++++-------------------------
 1 file changed, 11 insertions(+), 25 deletions(-)

diff --git a/files/installer.sh b/files/installer.sh
index aa1e0f2..f552f1e 100755
--- a/files/installer.sh
+++ b/files/installer.sh
@@ -1,35 +1,21 @@
 #!/usr/bin/env bash
 
-# include functions.sh again, thins it is a new environment
-. ./functions.sh
+. /opt/functions.sh
 
-# include develop config
-. ./installer.config
+. /tmp/answerfile
 
 # include diskspreparation.sh
-echo "run disks preparation"
-. ./diskspreparation.sh
-echo "run disks preparation finished"
+beginLogEntry "run disks preparation"
+. /opt/diskspreparation.sh
+finishLogEntry "done"
 
-# append local fstab, possible problems with automount included in tinycore
+beginLogEntry "mount target disks"
 cat /tmp/fstab.target >> /etc/fstab
-
-# inform kernel about changes
-sync
-sleep 2
-partprobe
-sleep 2
-
-# mount all unmounted file systems
 mount -a
-echo "mounting file systems"
+finishLogEntry "done"
 
-# include runinstaller.sh if it exists
-if [ -f runinstaller.sh ]
-  then
-  echo "run installer"
-  . ./runinstaller.sh
-  echo "run installer finished"
-  else
-  echo "file runinstaller.sh not found"
+if [ -f runinstaller.sh ];
+then
+  . /opt/runinstaller.sh
 fi
+
-- 
GitLab