fastinstall+optimierungen
This commit is contained in:
parent
d0d2d393f8
commit
14c986b417
1 changed files with 1005 additions and 930 deletions
91
arch-install
91
arch-install
|
@ -12,10 +12,40 @@ version="${2}"
|
|||
hostname="$(cat /etc/hostname)"
|
||||
[[ -z "${version}" ]] && version="${hostname#*-}"
|
||||
|
||||
#fastinstall arch-install fastinstall ${version} ${name} ${Partition} ${device} ${dateisystem} ${swap} ${swapspeicher} ${swapverschluesselung} ${offline} ${autodiskdevice} ${autostart} ${extraparameter}
|
||||
|
||||
if [ "${1}" == "fastinstall" ]; then
|
||||
# while-schleife
|
||||
while (( "$#" ))
|
||||
do
|
||||
echo ${1}
|
||||
export ${1}="y"
|
||||
startparameter="${startparameter}${1} "
|
||||
shift
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "${1}" == "fastinstallnext" ]; then
|
||||
# for-schleife
|
||||
for wort in ${3}
|
||||
do
|
||||
echo "$wort"
|
||||
export ${wort%=*}=${wort#*=}
|
||||
echo "Parameter ${wort%=*} = ${wort#*=}"
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This script must be run as root" 1>&2
|
||||
sudo "$0" "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" 2>&1 | tee /home/user1/install.log
|
||||
# while-schleife
|
||||
while (( "$#" ))
|
||||
do
|
||||
echo ${1}
|
||||
export ${1}="y"
|
||||
startparameter="${startparameter}${1} "
|
||||
shift
|
||||
done
|
||||
sudo "${0}" "${startparameter}" 2>&1 | tee /home/user1/install.log
|
||||
exit 0
|
||||
fi
|
||||
echo "Logged in as root"
|
||||
|
@ -833,6 +863,38 @@ function abfrage() {
|
|||
# Lade Deutsches Tastaturlayout
|
||||
loadkeys de
|
||||
|
||||
if [ "${1}" == "fastinstallnext" ]; then
|
||||
|
||||
[[ -z "${name}" ]] && name=arch-linux
|
||||
|
||||
[[ -z "${Partition}" ]] && Partition=bios
|
||||
|
||||
[[ -z "${boot}" ]] && boot=grub
|
||||
|
||||
[[ -z "${device}" ]] && device=/dev/sda
|
||||
|
||||
[[ -z "${dateisystem}" ]] && dateisystem=btrfs
|
||||
|
||||
[[ -z "${swapspeicher}" ]] && swapspeicher=8G
|
||||
|
||||
[[ -z "${swapverschluesselung}" ]] && swapverschluesselung=n
|
||||
|
||||
[[ -z "${autostart}" ]] && autostart=n
|
||||
|
||||
if [ "${offline}" != "n" ]
|
||||
then
|
||||
install="offline"
|
||||
else
|
||||
install="online"
|
||||
fi
|
||||
|
||||
if [ "${device}" == "/dev/nvme0n1" ]; then
|
||||
m2ssddevice=y
|
||||
fi
|
||||
|
||||
echo "Überspringe die Konfiguration wegen dem fastinstall Parameter!!!"
|
||||
echo "Sie können die Überprüfung mit skipcheck überspringen!!!"
|
||||
else
|
||||
read -p "What's your name?: " name
|
||||
[[ -z "${name}" ]] && name=arch-linux
|
||||
|
||||
|
@ -980,6 +1042,8 @@ function abfrage() {
|
|||
echo "Extra-Parameter ${wort}=y"
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
# Ausgaben
|
||||
|
||||
# Dateisystem
|
||||
|
@ -990,7 +1054,7 @@ function abfrage() {
|
|||
fi
|
||||
|
||||
#
|
||||
echo "Surname: ${name}"
|
||||
echo "Username: ${name}"
|
||||
echo "partition type: ${Partition}"
|
||||
echo "Bootloader: ${boot}"
|
||||
echo "Drive: ${device}"
|
||||
|
@ -1093,27 +1157,38 @@ function abfrage() {
|
|||
echo "ROOT-Partition = ${device}${rootpartitionnummer}"
|
||||
|
||||
#
|
||||
if [ "skipcheck" != "y" ]; then
|
||||
read -p "Are all the details correct ?: [y/N] " sicherheitsabfrage
|
||||
if [ "$sicherheitsabfrage" != "y" ]
|
||||
then
|
||||
echo "ABGEBROCHEN"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
echo "Operating system is installed !!!"
|
||||
sleep 5
|
||||
|
||||
|
||||
}
|
||||
|
||||
# Begin the Script!!!
|
||||
|
||||
|
||||
|
||||
|
||||
# for-schleife
|
||||
for wort in ${1}
|
||||
do
|
||||
echo "$wort"
|
||||
export ${wort%=*}=${wort#*=}
|
||||
echo "Parameter ${wort%=*} = ${wort#*=}"
|
||||
done
|
||||
|
||||
|
||||
|
||||
|
||||
if [ "${1}" != "n" ]
|
||||
if [ "${1}" == "fastinstall" ]; then
|
||||
gitclone
|
||||
/opt/${repo}/arch-install fastinstallnext ${version} "${startparameter}"
|
||||
exit 0
|
||||
elif [ "${phaseone}" != "n" ]
|
||||
then
|
||||
if wget -qO- ipv4.icanhazip.com 1>/dev/null 2>&1; then
|
||||
read -p "Should I look at the internet for a new install script and then run it ?: [Y/n] " update
|
||||
|
@ -1133,7 +1208,7 @@ then
|
|||
echo "Es kann sein das dass Programm nicht korrekt funktioniert!!!"
|
||||
fi
|
||||
gitclone
|
||||
/opt/${repo}/arch-install n ${version}
|
||||
/opt/${repo}/arch-install phaseone=n ${version}
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
@ -1300,7 +1375,7 @@ sleep 5
|
|||
secureumount
|
||||
echo ""
|
||||
echo "Fertig!!!"
|
||||
read -p "allation completed successfully. Do you want to RESTART the PC ?: [Y/n] " sicherheitsabfrage
|
||||
read -p "Allation completed successfully. Do you want to RESTART the PC ?: [Y/n] " sicherheitsabfrage
|
||||
if [ "$sicherheitsabfrage" != "n" ]
|
||||
then
|
||||
echo "restart now"
|
||||
|
|
Loading…
Reference in a new issue