From db6bb431fd0e57b71f75861b923bb903e8ae0cac Mon Sep 17 00:00:00 2001 From: simono41 Date: Thu, 7 Jun 2018 03:31:01 +0200 Subject: [PATCH] optimierungen --- arch-install | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/arch-install b/arch-install index ec0b255..e2a44e9 100755 --- a/arch-install +++ b/arch-install @@ -60,7 +60,9 @@ function minimalinstallation() { cp /opt/${repo}/aurinstall.sh ${mountpoint}/usr/bin/aurinstaller chmod +x ${mountpoint}/usr/bin/aurinstaller - echo "${name}´s_PC-${version}" > ${mountpoint}/etc/hostname + if [ "${name}" != "noinstall" ]; then + echo "${name}´s_PC-${version}" > ${mountpoint}/etc/hostname + fi arch-chroot ${mountpoint} arch-graphical-install-auto adduser user1 user1 arch-chroot ${mountpoint} pacman -Syu --needed --noconfirm @@ -174,7 +176,9 @@ function partionierenohneswap() { function usbkeyinstallation() { mkdir -p /mnt/usb-stick mount ${usbkeydevice} /mnt/usb-stick - dd if=/dev/urandom of=/mnt/usb-stick/archkey bs=512 count=4 + if ! [ -f "/mnt/usb-stick/archkey" ]; then + dd if=/dev/urandom of=/mnt/usb-stick/archkey bs=512 count=4 + fi cryptsetup luksAddKey ${device}${rootpartitionnummer} /mnt/usb-stick/archkey } @@ -435,8 +439,10 @@ function installation { fi fi - #hostname - echo "${name}´s_PC-${version}" > ${mountpoint}/etc/hostname + if [ "${name}" != "noinstall" ]; then + #hostname + echo "${name}´s_PC-${version}" > ${mountpoint}/etc/hostname + fi if [ "${name}" != "noinstall" ]; then if [ "${usbsecret}" == "y" ]; then