From 4f8166e66dfd81775b246d2c0a10dade23a6f65d Mon Sep 17 00:00:00 2001 From: simono41 Date: Fri, 20 Apr 2018 23:03:47 +0200 Subject: [PATCH] fix --- arch-graphical-install-auto | 2 +- update.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch-graphical-install-auto b/arch-graphical-install-auto index 42d0097..7122284 100755 --- a/arch-graphical-install-auto +++ b/arch-graphical-install-auto @@ -24,7 +24,7 @@ userpass="$3" archchroot="$4" hostname="$(cat /etc/hostname)" -version="${hostname#*-}" +[[ -z "${version}" ]] && version="${hostname#*-}" [[ -z "${username}" ]] && username="user1" [[ -z "${userpass}" ]] && userpass="user1" diff --git a/update.sh b/update.sh index 81b2198..d335f06 100755 --- a/update.sh +++ b/update.sh @@ -10,7 +10,8 @@ WEBADDRESS="https://github.com/simono41/SpectreOS.git" repo="SpectreOS" user="user1" hostname="$(cat /etc/hostname)" -version="${hostname#*-}" +version="${1}" +[[ -z "${version}" ]] && version="${hostname#*-}" if [[ $EUID -ne 0 ]]; then echo "This script must be run as root" 1>&2 @@ -45,7 +46,7 @@ then echo "Git is not installet" pacman -S git --needed --noconfirm fi - /opt/${repo}/arch-graphical-install-auto "${version}" "$2" "$3" + /opt/${repo}/arch-graphical-install-auto "${version}" "$2" "$3" "archchroot" read -p "Aktualisierung erfolgreich Abgeschlossen. Wollen sie den PC NEUSTARTEN?: [Y/n] " sicherheitsabfrage if [ "$sicherheitsabfrage" != "n" ] then